Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package deepin-manual for openSUSE:Factory checked in at 2022-09-01 22:10:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/deepin-manual (Old) and /work/SRC/openSUSE:Factory/.deepin-manual.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "deepin-manual" Thu Sep 1 22:10:20 2022 rev:5 rq:1000252 version:5.8.12 Changes: -------- --- /work/SRC/openSUSE:Factory/deepin-manual/deepin-manual.changes 2022-04-22 21:54:39.590833726 +0200 +++ /work/SRC/openSUSE:Factory/.deepin-manual.new.2083/deepin-manual.changes 2022-09-01 22:11:20.592272396 +0200 @@ -1,0 +2,13 @@ +Fri Aug 26 02:25:49 UTC 2022 - Hillwood Yang <[email protected]> + +- Update version to 5.8.12 + * Add event tracking feature + * Fix bugs + +------------------------------------------------------------------- +Fri Jul 1 03:21:15 UTC 2022 - Hillwood Yang <[email protected]> + +- Update version to 5.8.9 + * Fix bugs + +------------------------------------------------------------------- Old: ---- deepin-manual-5.8.5.tar.gz New: ---- deepin-manual-5.8.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ deepin-manual.spec ++++++ --- /var/tmp/diff_new_pack.SAdh95/_old 2022-09-01 22:11:21.120273840 +0200 +++ /var/tmp/diff_new_pack.SAdh95/_new 2022-09-01 22:11:21.124273851 +0200 @@ -23,7 +23,7 @@ %endif Name: deepin-manual -Version: 5.8.5 +Version: 5.8.12 Release: 0 Summary: Deepin Manual License: GPL-3.0-or-later ++++++ deepin-manual-5.8.5.tar.gz -> deepin-manual-5.8.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/.github/workflows/backup-to-gitlab.yml new/deepin-manual-5.8.12/.github/workflows/backup-to-gitlab.yml --- old/deepin-manual-5.8.5/.github/workflows/backup-to-gitlab.yml 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/.github/workflows/backup-to-gitlab.yml 2022-08-02 09:31:01.000000000 +0200 @@ -2,7 +2,7 @@ on: [push] concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }} cancel-in-progress: true jobs: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/.github/workflows/call-build-deb.yml new/deepin-manual-5.8.12/.github/workflows/call-build-deb.yml --- old/deepin-manual-5.8.5/.github/workflows/call-build-deb.yml 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/.github/workflows/call-build-deb.yml 2022-08-02 09:31:01.000000000 +0200 @@ -1,7 +1,9 @@ name: Call build-deb on: pull_request_target: - types: [opened, synchronize] + paths-ignore: + - ".github/workflows/**" + types: [ opened, closed, synchronize ] concurrency: group: ${{ github.workflow }}-pull/${{ github.event.number }} @@ -9,6 +11,7 @@ jobs: check_job: - uses: linuxdeepin/.github/.github/workflows/jenkins-bridge.yml@master + if: github.event.action != 'closed' || github.event.pull_request.merged + uses: linuxdeepin/.github/.github/workflows/build-deb.yml@master secrets: BridgeToken: ${{ secrets.BridgeToken }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/.github/workflows/call-chatOps.yml new/deepin-manual-5.8.12/.github/workflows/call-chatOps.yml --- old/deepin-manual-5.8.5/.github/workflows/call-chatOps.yml 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/.github/workflows/call-chatOps.yml 2022-08-02 09:31:01.000000000 +0200 @@ -6,3 +6,5 @@ jobs: chatopt: uses: linuxdeepin/.github/.github/workflows/chatOps.yml@master + secrets: + APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/.github/workflows/call-clacheck.yml new/deepin-manual-5.8.12/.github/workflows/call-clacheck.yml --- old/deepin-manual-5.8.5/.github/workflows/call-clacheck.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/deepin-manual-5.8.12/.github/workflows/call-clacheck.yml 2022-08-02 09:31:01.000000000 +0200 @@ -0,0 +1,16 @@ +name: Call CLA check +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened, closed, synchronize] + +concurrency: + group: ${{ github.workflow }}-pull/${{ github.event.number }} + cancel-in-progress: true + +jobs: + clacheck: + uses: linuxdeepin/.github/.github/workflows/cla-check.yml@master + secrets: + APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/.github/workflows/cppcheck.yml new/deepin-manual-5.8.12/.github/workflows/cppcheck.yml --- old/deepin-manual-5.8.5/.github/workflows/cppcheck.yml 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/.github/workflows/cppcheck.yml 2022-08-02 09:31:01.000000000 +0200 @@ -1,6 +1,8 @@ name: cppcheck on: pull_request_target: + paths-ignore: + - ".github/workflows/**" concurrency: group: ${{ github.workflow }}-pull/${{ github.event.number }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/CMakeLists.txt new/deepin-manual-5.8.12/CMakeLists.txt --- old/deepin-manual-5.8.5/CMakeLists.txt 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/CMakeLists.txt 2022-08-02 09:31:01.000000000 +0200 @@ -9,4 +9,8 @@ option(DMAN_RELEAE OFF "Install dman resources to system or not") add_subdirectory(src) -add_subdirectory(tests) + +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + add_subdirectory(tests) +endif() + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/CMakeLists.txt new/deepin-manual-5.8.12/src/CMakeLists.txt --- old/deepin-manual-5.8.5/src/CMakeLists.txt 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/CMakeLists.txt 2022-08-02 09:31:01.000000000 +0200 @@ -144,6 +144,8 @@ base/consts.h base/utils.cpp base/utils.h + base/eventlogutils.h + base/eventlogutils.cpp ) set(CONTROLLER_FILES @@ -236,6 +238,8 @@ dbus/dbusvariant/app_info.h controller/search_db.cpp controller/search_db.h + base/eventlogutils.h + base/eventlogutils.cpp ) add_executable(generate-search-db ${SEARCH_FILES}) @@ -271,6 +275,8 @@ base/utils.h base/consts.cpp base/consts.h + base/eventlogutils.h + base/eventlogutils.cpp dbus/dbus_consts.cpp dbus/dbus_consts.h dbus/dbusvariant/app_info.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/app/dman.cpp new/deepin-manual-5.8.12/src/app/dman.cpp --- old/deepin-manual-5.8.5/src/app/dman.cpp 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/app/dman.cpp 2022-08-02 09:31:01.000000000 +0200 @@ -22,6 +22,7 @@ #include "resources/themes/images.h" #include "controller/shellobj.h" #include "base/utils.h" +#include "base/eventlogutils.h" #include <DApplication> #include <DApplicationSettings> @@ -45,8 +46,8 @@ qputenv("DXCB_FAKE_PLATFORM_NAME_XCB", "true"); //??????GPU qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-gpu"); - - if(!Utils::judgeWayLand()){ + + if (!Utils::judgeWayLand()) { qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--single-process"); } @@ -62,7 +63,7 @@ qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--no-sandbox"); #endif - if(Utils::judgeWayLand()){ + if (Utils::judgeWayLand()) { qputenv("QT_WAYLAND_SHELL_INTEGRATION", "kwayland-shell"); qputenv("_d_disableDBusFileDialog", "true"); setenv("PULSE_PROP_media.role", "video", 1); @@ -125,6 +126,13 @@ Dtk::Core::DLogManager::registerFileAppender(); Dtk::Core::DLogManager::registerConsoleAppender(); + //???????????????????????? + QJsonObject objStartEvent{ + {"tid", Eventlogutils::StartUp}, + {"vsersion", VERSION}, + {"mode", 1}, + }; + Eventlogutils::GetInstance()->writeLogs(objStartEvent); // fix error for cutelogger // No appenders associated with category js // ???????????? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/app/dman_helper.cpp new/deepin-manual-5.8.12/src/app/dman_helper.cpp --- old/deepin-manual-5.8.5/src/app/dman_helper.cpp 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/app/dman_helper.cpp 2022-08-02 09:31:01.000000000 +0200 @@ -40,7 +40,6 @@ qDebug() << Dtk::Core::DLogManager::getlogFilePath(); -#ifndef __sw_64__ QOpenGLContext ctx; QSurfaceFormat fmt; fmt.setRenderableType(QSurfaceFormat::OpenGL); @@ -52,7 +51,6 @@ fmt.setDefaultFormat(fmt); fmt.setProfile(QSurfaceFormat::CoreProfile); qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-gpu"); -#endif Dtk::Core::DLogManager::registerFileAppender(); Dtk::Core::DLogManager::registerConsoleAppender(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/base/eventlogutils.cpp new/deepin-manual-5.8.12/src/base/eventlogutils.cpp --- old/deepin-manual-5.8.5/src/base/eventlogutils.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/deepin-manual-5.8.12/src/base/eventlogutils.cpp 2022-08-02 09:31:01.000000000 +0200 @@ -0,0 +1,34 @@ +#include "eventlogutils.h" +#include <QLibrary> +#include <QDir> +#include <QLibraryInfo> +#include <QJsonDocument> + +Eventlogutils *Eventlogutils::m_pInstance = nullptr; +Eventlogutils *Eventlogutils::GetInstance() +{ + if (m_pInstance == nullptr) { + m_pInstance = new Eventlogutils(); + } + return m_pInstance; +} + +void Eventlogutils::writeLogs(QJsonObject &data) +{ + if (!writeEventLogFunc) + return; + + writeEventLogFunc(QJsonDocument(data).toJson(QJsonDocument::Compact).toStdString()); +} + +Eventlogutils::Eventlogutils() +{ + QLibrary library("libdeepin-event-log.so"); + initFunc = reinterpret_cast<bool (*)(const std::string &, bool)>(library.resolve("Initialize")); + writeEventLogFunc = reinterpret_cast<void (*)(const std::string &)>(library.resolve("WriteEventLog")); + + if (!initFunc) + return; + + initFunc("deepin-manual", true); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/base/eventlogutils.h new/deepin-manual-5.8.12/src/base/eventlogutils.h --- old/deepin-manual-5.8.5/src/base/eventlogutils.h 1970-01-01 01:00:00.000000000 +0100 +++ new/deepin-manual-5.8.12/src/base/eventlogutils.h 2022-08-02 09:31:01.000000000 +0200 @@ -0,0 +1,26 @@ +#ifndef EVENTLOGUTILS_H +#define EVENTLOGUTILS_H +#include <QJsonObject> +#include <string> + +class Eventlogutils +{ +public: + enum EventTID { + OpenTime = 1000000000, + CloseTime = 1000000001, + StartUp = 1000000003, + Quit = 1000000004, + }; + + static Eventlogutils *GetInstance(); + void writeLogs(QJsonObject &data); +private : + static Eventlogutils *m_pInstance; + Eventlogutils(); + + bool (*initFunc)(const std::string &packagename, bool enable_sig) = nullptr; + void (*writeEventLogFunc)(const std::string &eventdata) = nullptr; +}; + +#endif // EVENTLOGUTILS_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/base/utils.cpp new/deepin-manual-5.8.12/src/base/utils.cpp --- old/deepin-manual-5.8.5/src/base/utils.cpp 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/base/utils.cpp 2022-08-02 09:31:01.000000000 +0200 @@ -398,9 +398,9 @@ */ bool Utils::hasSelperSupport() { - int nType = Dtk::Core::DSysInfo::deepinType(); + Dtk::Core::DSysInfo::UosEdition type = Dtk::Core::DSysInfo::uosEditionType(); //??????????????????????????????????????? - if (Dtk::Core::DSysInfo::DeepinProfessional == (Dtk::Core::DSysInfo::DeepinType)nType) { + if (Dtk::Core::DSysInfo::UosProfessional == type || Dtk::Core::DSysInfo::UosMilitary == type || Dtk::Core::DSysInfo::UosMilitaryS == type) { const QStringList list = getSystemManualList(); if (list.contains("uos-service-support")) { return true; @@ -417,6 +417,7 @@ switch (type) { //????????? case Dtk::Core::DSysInfo::UosProfessional: + case Dtk::Core::DSysInfo::UosMilitary: retList.append("p"); break; //????????? @@ -429,6 +430,7 @@ break; //?????????????????? case Dtk::Core::DSysInfo::UosEnterprise: + case Dtk::Core::DSysInfo::UosMilitaryS: retList.append("e"); retList.append("s"); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/controller/search_db.cpp new/deepin-manual-5.8.12/src/controller/search_db.cpp --- old/deepin-manual-5.8.5/src/controller/search_db.cpp 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/controller/search_db.cpp 2022-08-02 09:31:01.000000000 +0200 @@ -237,7 +237,7 @@ for (int i = 0; i < contents.size(); i++) { QString content = contents.at(i); content = content.replace("icon/", DMAN_INSTALL_DB_PATH + strManualPath - + "/" + app_name + "/" + lang + "/icon/"); + + "/" + app_name + "/" + lang + "/icon/"); newContents.replace(i, content); } } else { @@ -262,7 +262,7 @@ QSqlQuery query(p_->db); bool preok = query.prepare(kSearchDeleteEntryByApp); - if(!preok){ + if (!preok) { qCritical() << "Failed to prepare skSearchDeleteEntryByApp:" << query.lastError().text(); return; } @@ -278,7 +278,7 @@ return; } preok = query.prepare(kSearchInsertEntry); - if(!preok){ + if (!preok) { qCritical() << "Failed to prepare kSearchInsertEntry:" << query.lastError().text(); return; } @@ -321,7 +321,7 @@ Q_ASSERT(p_->db.isOpen()); QSqlQuery query(p_->db); bool preok = query.prepare(kSearchDeleteEntryByApp); - if(!preok){ + if (!preok) { qCritical() << "Failed to prepare kSearchDeleteEntryByApp:" << query.lastError().text(); return; } @@ -365,7 +365,7 @@ if (0 == icount) { //?????????????????????????????? if (0 == lang.compare("ug_CN") || 0 == lang.compare("bo_CN") - || 0 == lang.compare("zh_HK") || 0 == lang.compare("zh_TW")) { + || 0 == lang.compare("zh_HK") || 0 == lang.compare("zh_TW")) { lang = "zh_CN"; } else { lang = "en_US"; @@ -614,6 +614,12 @@ emit this->searchContentMismatch(keyword); return; } + //??????%?????????????????????????????? + if (keyword.contains(QRegExp("%%"))) { + //????????????????????????->SearchManager::searchContentMismatch->SearchProxy::mismatch->JS + emit this->searchContentMismatch(keyword); + return; + } QSqlQuery query(p_->db); QString lang = QLocale().name(); @@ -623,7 +629,7 @@ if (0 == icount) { //?????????????????????????????? if (0 == lang.compare("ug_CN") || 0 == lang.compare("bo_CN") - || 0 == lang.compare("zh_HK") || 0 == lang.compare("zh_TW")) { + || 0 == lang.compare("zh_HK") || 0 == lang.compare("zh_TW")) { lang = "zh_CN"; } else { lang = "en_US"; @@ -735,7 +741,7 @@ QSqlQuery query(p_->db); bool preok = query.prepare(kfileTimeDeleteEntryByApp); - if(!preok){ + if (!preok) { qCritical() << "Failed to prepare kSearchDeleteEntryByApp:" << query.lastError().text(); return; } @@ -750,7 +756,7 @@ return; } preok = query.prepare(kfileTimeInsertEntry); - if(!preok){ + if (!preok) { qCritical() << "Failed to prepare kfileTimeInsertEntry:" << query.lastError().text(); return; } @@ -777,7 +783,7 @@ QSqlQuery query(p_->db); bool preok = query.prepare(kfileTimeDeleteEntryByApp); - if(!preok){ + if (!preok) { qCritical() << "Failed to prepare kfileTimeDeleteEntryByApp:" << query.lastError().text(); return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/controller/window_manager.cpp new/deepin-manual-5.8.12/src/controller/window_manager.cpp --- old/deepin-manual-5.8.5/src/controller/window_manager.cpp 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/controller/window_manager.cpp 2022-08-02 09:31:01.000000000 +0200 @@ -30,8 +30,8 @@ #include <QDesktopWidget> #define WM_SENDER_NAME "Sender" -const int kWinMinWidth = 800; -const int kWinMinHeight = 600; +const int kWinMinWidth = 680; +const int kWinMinHeight = 300; WindowManager::WindowManager(QObject *parent) : QObject(parent) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/dbus/com.deepin.Manual.Open.service new/deepin-manual-5.8.12/src/dbus/com.deepin.Manual.Open.service --- old/deepin-manual-5.8.5/src/dbus/com.deepin.Manual.Open.service 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/dbus/com.deepin.Manual.Open.service 2022-08-02 09:31:01.000000000 +0200 @@ -1,3 +1,3 @@ [D-BUS Service] Name=com.deepin.Manual.Open -Exec=/usr/bin/dman --dbus \ No newline at end of file +Exec=/usr/bin/busctl --user call -- com.deepin.SessionManager /com/deepin/StartManager com.deepin.StartManager LaunchApp suas /usr/share/applications/deepin-manual.desktop 0 1 --dbus diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/view/web_window.cpp new/deepin-manual-5.8.12/src/view/web_window.cpp --- old/deepin-manual-5.8.5/src/view/web_window.cpp 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/view/web_window.cpp 2022-08-02 09:31:01.000000000 +0200 @@ -47,6 +47,10 @@ #include <QClipboard> #include <QNetworkProxyFactory> +#define SEARCH_EDIT_WIDTH 350 // ???????????????????????????????????? +#define SEARCH_EDIT_HEIGHT 44 // ???????????????????????????????????? +#define LIMIT_SEARCH_EDIT_WIDTH 750 // ???????????? + namespace { const int kSearchDelay = 200; @@ -304,6 +308,15 @@ void WebWindow::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); + + // ???????????????????????????????????????????????????????????????????????? + int detal = LIMIT_SEARCH_EDIT_WIDTH - event->size().width(); + if(detal <= 0){ + search_edit_->setFixedWidth(SEARCH_EDIT_WIDTH); + }else if(detal != LIMIT_SEARCH_EDIT_WIDTH){ + search_edit_->setFixedWidth(SEARCH_EDIT_WIDTH - detal); + } + if(completion_window_->isVisible()){ completion_window_->autoResize(); // Move to below of search edit. @@ -365,7 +378,8 @@ bool WebWindow::eventFilter(QObject *watched, QEvent *event) { //warland?????????watched???objectname??????QMainWindowClassWindow,??????????????? - if (event->type() == QEvent::MouseButtonRelease && qApp->activeWindow() == this ) { + DIconButton* btn = findChild<DIconButton*>("DTitlebarDWindowMaxButton"); + if (event->type() == QEvent::MouseButtonRelease && qApp->activeWindow() == this && !btn->isDown()) { QRect rect = hasWidgetRect(search_edit_); if (web_view_ && web_view_->selectedText().isEmpty() && !rect.contains(QCursor::pos())) { this->setFocus(); @@ -581,7 +595,7 @@ search_edit_ = new SearchEdit; DFontSizeManager::instance()->bind(search_edit_, DFontSizeManager::T6, QFont::Normal); search_edit_->setObjectName("SearchEdit"); - search_edit_->setFixedSize(350, 44); + search_edit_->setFixedSize(SEARCH_EDIT_WIDTH, SEARCH_EDIT_HEIGHT); search_edit_->setPlaceHolder(QObject::tr("Search")); if (Utils::hasSelperSupport()) { DMenu *pMenu = new DMenu; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/web/toManual/sass/article.scss new/deepin-manual-5.8.12/src/web/toManual/sass/article.scss --- old/deepin-manual-5.8.5/src/web/toManual/sass/article.scss 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/web/toManual/sass/article.scss 2022-08-02 09:31:01.000000000 +0200 @@ -22,7 +22,7 @@ .read { position: absolute; width: 90%; - min-width: 600px; + min-width: 400px; max-width: 1024px; left: 50%; transform: translateX(-50%); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/web_dist/toManual/index.css new/deepin-manual-5.8.12/src/web_dist/toManual/index.css --- old/deepin-manual-5.8.5/src/web_dist/toManual/index.css 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/web_dist/toManual/index.css 2022-08-02 09:31:01.000000000 +0200 @@ -56,7 +56,7 @@ #article #article_bg .read { position: absolute; width: 90%; - min-width: 600px; + min-width: 400px; max-width: 1024px; left: 50%; transform: translateX(-50%); @@ -289,12 +289,11 @@ margin-top: 18px; margin-bottom: 3px; } #index .items .item .content { - margin-left: 15px; width: var(--index-span-width); word-break: normal; overflow: hidden; text-overflow: ellipsis; - display: -webkit-box; + margin: auto; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-family: var(--nav-world-font-family); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/src/web_dist/toManual/index.js new/deepin-manual-5.8.12/src/web_dist/toManual/index.js --- old/deepin-manual-5.8.5/src/web_dist/toManual/index.js 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/src/web_dist/toManual/index.js 2022-08-02 09:31:01.000000000 +0200 @@ -48050,7 +48050,14 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - +function _isbase64(str){ + if (str == '' || str.trim == '') + {return false;} + try {return btoa(atob(str)) == str} + catch(err){ + return false; + } +} global.hash = ' '; global.isMouseClickNav = false; global.isMouseScrollArticle = false; @@ -48346,6 +48353,7 @@ value: function componentWillReceiveProps(nextProps) { console.log("app componentWillReceiveProps", this.context.router.history); console.log("this location: " + this.context.router.history.location); + console.log(this.context.router.history.location.pathname); var pathName = this.context.router.history.location.pathname; var pathList = pathName.split("/"); var cKeyword = ''; @@ -48359,12 +48367,14 @@ } // global.qtObjects.search.getKeyword(decodeURIComponent(cKeyword)); - if (cKeyword == '%') { - global.qtObjects.search.getKeyword(cKeyword); - } else { - console.log("decode URIComponent componentWillReceiveProps"); - global.qtObjects.search.getKeyword(decodeURIComponent(cKeyword)); - } + if(_isbase64(cKeyword)) + { + global.qtObjects.search.getKeyword(decodeURIComponent(atob(cKeyword))); + } + else + { + global.qtObjects.search.getKeyword(decodeURIComponent(cKeyword)); + } if (this.context.router.history.action == 'PUSH') { var entriesLen = this.context.router.history.entries.length; @@ -48413,7 +48423,6 @@ var hash = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; - console.log("global.open()....file:" + file + " hash:" + hash + " key:" + key); //h0??????????????????????????????????????????????????????h0???????????????h1?????????????????? if (hash == 'h0' || hash == '') { hash = 'h1'; @@ -48429,6 +48438,7 @@ } var url = '/open/' + file + '/' + hash + '/' + key; + console.warn(url); _this5.context.router.history.push(url); //Init????????????, ??????index???opentitle???. ?????????????????????????????????????????????/??????. @@ -48678,7 +48688,7 @@ _this5.context.router.history.index = lastHistoryIndex - 1; _this5.setState({ searchResult: [] }); - _this5.context.router.history.push('/search/' + encodeURIComponent(decodeKeyword)); + _this5.context.router.history.push('/search/' +btoa(encodeURIComponent(decodeKeyword))); return; } @@ -48695,7 +48705,7 @@ } _this5.setState({ searchResult: [] }); - _this5.context.router.history.push('/search/' + encodeURIComponent(decodeKeyword)); + _this5.context.router.history.push('/search/' + btoa(encodeURIComponent(decodeKeyword))); }; this.context.router.history.listen(function (location, action) { @@ -50313,10 +50323,9 @@ var resultList = []; //?????????????????? - var keyTemp = this.props.keyword; if (this.props.keyword !== '%') { - keyTemp = decodeURIComponent(this.props.keyword); + keyTemp =this.props.keyword; } // let keyTemp = decodeURIComponent(this.props.keyword) @@ -50449,7 +50458,7 @@ idList: result.idList, titleList: result.titleList, contentList: result.contentList, - keyword: _this4.props.match.params.keyword + keyword: _this4.props.match.params.keyword, }); }); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/tests/src/base/ut_utils.cpp new/deepin-manual-5.8.12/tests/src/base/ut_utils.cpp --- old/deepin-manual-5.8.5/tests/src/base/ut_utils.cpp 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/tests/src/base/ut_utils.cpp 2022-08-02 09:31:01.000000000 +0200 @@ -268,13 +268,13 @@ TEST_F(ut_utils_test, hasSelperSupport) { // ASSERT_TRUE(m_utils->hasSelperSupport()); - Utils *m_utils = new Utils; - Stub s; - s.set(ADDR(Utils, getSystemManualList), manaulapplist); +// Utils *m_utils = new Utils; +// Stub s; +// s.set(ADDR(Utils, getSystemManualList), manaulapplist); - ASSERT_TRUE(m_utils->hasSelperSupport()); +// ASSERT_TRUE(m_utils->hasSelperSupport()); - delete m_utils; +// delete m_utils; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deepin-manual-5.8.5/tests/src/view/ut_web_window.cpp new/deepin-manual-5.8.12/tests/src/view/ut_web_window.cpp --- old/deepin-manual-5.8.5/tests/src/view/ut_web_window.cpp 2022-03-17 04:44:11.000000000 +0100 +++ new/deepin-manual-5.8.12/tests/src/view/ut_web_window.cpp 2022-08-02 09:31:01.000000000 +0200 @@ -741,10 +741,8 @@ list.append(result2); web->onSearchAnchorResult("", list); - QResizeEvent *event; - web->completion_window_->setVisible(true); - web->resizeEvent(event); + web->resize(web->size()+QSize(1,1)); const QPoint local_point(web->rect().width() / 2 - web->search_edit_->width() / 2, web->titlebar()->height() - 3); @@ -770,10 +768,8 @@ list.append(result2); web->onSearchAnchorResult("", list); - QResizeEvent *event; - web->completion_window_->setVisible(true); - web->resizeEvent(event); + web->resize(web->size()+QSize(1,1)); const QPoint local_point(web->rect().width() / 2 - web->search_edit_->width() / 2, web->titlebar()->height() - 3);
