Skip to content

Commit

Permalink
opt: do not need to reload webview when initialize dictionaries (#1690)
Browse files Browse the repository at this point in the history
* opt: do not need to reload webview when initialize dictionaries

During this phase ,the webview has not existed yet
  • Loading branch information
xiaoyifang authored Jul 17, 2024
1 parent 99ce0a7 commit 521c359
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/release-windows-vcpkg-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: [windows-2022]
qt_ver: [ 6.7.2 ]
qt_ver: [ 6.7.2, 6.6.3 ]
qt_arch: [win64_msvc2019_64]
env:
version: 24.05.13
Expand Down Expand Up @@ -168,8 +168,22 @@ jobs:
gh release upload "${tagName}" "${namePrefix}.7z#${namePrefix}-Windows.7z" --clobber
gh release upload "${tagName}" "${namePrefix}.exe#${namePrefix}-Windows-installer.exe" --clobber
cd './goldendict'
gh release upload "${tagName}" "goldendict.exe#${namePrefix}-Windows-main-exe-file-only.exe" --clobber
gh release upload "${tagName}" "goldendict.pdb#${namePrefix}-Windows-debug-file.pdb" --clobber
cd ..
- name: Upload Single packages
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tagName="v${{env.version}}-${{env.versionSuffix}}.$(git rev-parse --short=8 HEAD)"
echo $tagName
namePrefix="GoldenDict-ng-${{env.version}}-Qt${{matrix.qt_ver}}"
cd ./build_dir/goldendict
# rename to avoid conflict with other packages
mv goldendict.exe goldendict-Qt${{matrix.qt_ver}}.exe
mv goldendict.pdb goldendict-Qt${{matrix.qt_ver}}.pdb
gh release upload "${tagName}" "goldendict-Qt${{matrix.qt_ver}}.exe#${namePrefix}-Windows-main-exe-file-only.exe" --clobber
gh release upload "${tagName}" "goldendict-Qt${{matrix.qt_ver}}.pdb#${namePrefix}-Windows-debug-file.pdb" --clobber
cd ..
6 changes: 3 additions & 3 deletions src/ui/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,7 @@ void MainWindow::makeDictionaries()
ftsIndexing.doIndexing();

updateStatusLine();
updateGroupList();
updateGroupList( false );
}

void MainWindow::updateStatusLine()
Expand Down Expand Up @@ -1597,9 +1597,9 @@ void MainWindow::updateGroupList( bool reload )

updateDictionaryBar();

qDebug() << "Reloading all the tabs...";

if ( reload ) {
qDebug() << "Reloading all the tabs...";

for ( int i = 0; i < ui.tabWidget->count(); ++i ) {
auto & view = dynamic_cast< ArticleView & >( *( ui.tabWidget->widget( i ) ) );

Expand Down

0 comments on commit 521c359

Please sign in to comment.