From ddb9203e3425a9762fb1d56666c201adf13cc325 Mon Sep 17 00:00:00 2001 From: xiaoyifang <105986+xiaoyifang@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:51:57 +0800 Subject: [PATCH 1/5] fix: full text search navigation panel (#1623) * fix: full text search navigation panel * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- src/ui/articleview.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/articleview.cc b/src/ui/articleview.cc index 13b5c5267..97304ee9c 100644 --- a/src/ui/articleview.cc +++ b/src/ui/articleview.cc @@ -2133,6 +2133,11 @@ void ArticleView::highlightFTSResults() .arg( regString ); webview->page()->runJavaScript( script ); + auto parts = regString.split( " ", Qt::SkipEmptyParts ); + if ( !parts.isEmpty() ) { + firstAvailableText = parts[ 0 ]; + ftsSearchPanel->show(); + } } void ArticleView::setActiveDictIds( const ActiveDictIds & ad ) From 8b67a9bd7eada0009817dcc8ca3cf1e8dd1a97e3 Mon Sep 17 00:00:00 2001 From: Xiao Yi Fang Date: Wed, 3 Jul 2024 09:44:48 +0800 Subject: [PATCH 2/5] opt: macos add qt6.6.3 release --- .github/workflows/release-macos-homebrew.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-macos-homebrew.yml b/.github/workflows/release-macos-homebrew.yml index 90cf15959..15c2290fb 100644 --- a/.github/workflows/release-macos-homebrew.yml +++ b/.github/workflows/release-macos-homebrew.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [macos-12,macos-14] - qt_ver: [ 6.7.2 ] + qt_ver: [ 6.7.2,6.6.3 ] qt_arch: [clang_64] env: targetName: GoldenDict From 89daa70b6b11dd41e4016ed0e63d5a8a532d4c6e Mon Sep 17 00:00:00 2001 From: Xiao Yi Fang Date: Wed, 3 Jul 2024 11:26:06 +0800 Subject: [PATCH 3/5] Revert "clean: remove useless code and refactor" This reverts commit 3a46dd290b995f7a0040bbe590ef26b4794a68fe. the changes is not exactly the same. close the last tab will cause the windows to create a new blank tab which will fall into infinite loop --- src/ui/mainwindow.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index 30311234f..ae32dc1e7 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -1834,9 +1834,11 @@ void MainWindow::closeCurrentTab() void MainWindow::closeAllTabs() { - while ( ui.tabWidget->count() > 0 ) { + while ( ui.tabWidget->count() > 1 ) closeCurrentTab(); - } + + // close last tab + closeCurrentTab(); } void MainWindow::closeRestTabs() @@ -1876,13 +1878,19 @@ void MainWindow::switchToPrevTab() void MainWindow::backClicked() { + GD_DPRINTF( "Back\n" ); + ArticleView * view = getCurrentArticleView(); + view->back(); } void MainWindow::forwardClicked() { + GD_DPRINTF( "Forward\n" ); + ArticleView * view = getCurrentArticleView(); + view->forward(); } From b0fb5d2f875322a0792bb46f660e8ee62b939ddf Mon Sep 17 00:00:00 2001 From: Xiao Yi Fang Date: Wed, 3 Jul 2024 11:27:54 +0800 Subject: [PATCH 4/5] remove debug log --- src/ui/mainwindow.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index ae32dc1e7..02a30f6c3 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -1878,8 +1878,6 @@ void MainWindow::switchToPrevTab() void MainWindow::backClicked() { - GD_DPRINTF( "Back\n" ); - ArticleView * view = getCurrentArticleView(); view->back(); @@ -1887,8 +1885,6 @@ void MainWindow::backClicked() void MainWindow::forwardClicked() { - GD_DPRINTF( "Forward\n" ); - ArticleView * view = getCurrentArticleView(); view->forward(); From fe2aa0638ee01aa4159cb895d59061efc7b820b4 Mon Sep 17 00:00:00 2001 From: shenlebantongying Date: Tue, 2 Jul 2024 16:55:12 -0400 Subject: [PATCH 5/5] feat: breakpad support for cmake/vcpkg build --- CMakeLists.txt | 9 +++++++++ cmake/Deps_Vcpkg.cmake | 5 +++++ website/docs/howto/build_from_source.md | 1 + 3 files changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33bf4be3a..e5b2de350 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ option(USE_SYSTEM_TOML "use system toml++ instead of bundled one" OFF) # vcpkg build - only tested on Windows, does not support FFMPEG option(USE_VCPKG "uses VCPKG for providing dependencies" OFF) +option(WITH_VCPKG_BREAKPAD "build with Breakpad support for VCPKG build only" OFF) ## Change binary & resources folder to parallel install with original GD. ## This flag should be avoided because it leads to small regressions: @@ -21,6 +22,10 @@ option(USE_ALTERNATIVE_NAME "Force the name goldendict-ng " OFF) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}") # to put staff in the ./cmake folder +if(WITH_VCPKG_BREAKPAD) + list(APPEND VCPKG_MANIFEST_FEATURES "breakpad") +endif() + include(FeatureSummary) project(goldendict-ng @@ -192,6 +197,10 @@ if (WITH_ZIM) target_compile_definitions(${GOLDENDICT} PUBLIC MAKE_ZIM_SUPPORT) endif () +if (WITH_VCPKG_BREAKPAD) + target_compile_definitions(${GOLDENDICT} PUBLIC USE_BREAKPAD) +endif () + #### libraries linking && includes for Win or Unix if (USE_VCPKG) diff --git a/cmake/Deps_Vcpkg.cmake b/cmake/Deps_Vcpkg.cmake index c189c23d2..1f4eb50cb 100644 --- a/cmake/Deps_Vcpkg.cmake +++ b/cmake/Deps_Vcpkg.cmake @@ -24,6 +24,11 @@ target_link_libraries(${GOLDENDICT} ZLIB::ZLIB ) +if (WITH_VCPKG_BREAKPAD) + find_package(unofficial-breakpad REQUIRED) + target_link_libraries(${GOLDENDICT} PRIVATE unofficial::breakpad::libbreakpad_client) +endif () + if (WITH_EPWING_SUPPORT) add_subdirectory(thirdparty/eb EXCLUDE_FROM_ALL) target_include_directories(${GOLDENDICT} PRIVATE diff --git a/website/docs/howto/build_from_source.md b/website/docs/howto/build_from_source.md index 2439ca447..99f6fe655 100644 --- a/website/docs/howto/build_from_source.md +++ b/website/docs/howto/build_from_source.md @@ -91,6 +91,7 @@ Add this to cmake command: Most `.dll` built by vcpkg will be automatically copied, but the Qt ones won't. You can + * run `cmake --install .` (recommended) * manually run windeployqt * add `${Qt's install path}\Qt\6.5.2\msvc2019_64\bin` to your PATH environment variable