aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2024-01-31 13:13:53 +0000
committerGitHub <[email protected]>2024-01-31 13:13:53 +0000
commitb79cb4ecb942b0c4fb8fe7955d1c6a777f13bef6 (patch)
treebe0c854dbd2c64a980003e91fa843718346635d6
parentMerge pull request #127 from saturneric/dev/2.1.1/main (diff)
parentfix: copy qt5 dlls at qt5 build mode (diff)
downloadGpgFrontend-b79cb4ecb942b0c4fb8fe7955d1c6a777f13bef6.tar.gz
GpgFrontend-b79cb4ecb942b0c4fb8fe7955d1c6a777f13bef6.zip
Merge pull request #128 from saturneric/dev/2.1.1/main
Develop 2.1.2.3
-rw-r--r--.github/workflows/release-qt5.yml76
-rw-r--r--CMakeLists.txt7
-rw-r--r--resource/lfs/locale/ts/GpgFrontend.de_DE.ts138
-rw-r--r--resource/lfs/locale/ts/GpgFrontend.fr_FR.ts28
-rw-r--r--resource/lfs/locale/ts/GpgFrontend.it_IT.ts28
-rw-r--r--resource/lfs/locale/ts/GpgFrontend.zh_CN.ts56
-rw-r--r--resource/lfs/locale/ts/GpgFrontend.zh_TW.ts28
-rw-r--r--src/CMakeLists.txt88
-rw-r--r--src/core/CMakeLists.txt11
-rw-r--r--src/core/function/ArchiveFileOperator.cpp4
-rw-r--r--src/core/function/gpg/GpgCommandExecutor.cpp2
-rw-r--r--src/core/function/gpg/GpgContext.cpp14
-rw-r--r--src/module/integrated/gnupg_info_gathering_module/GnuPGInfoGatheringModule.cpp9
-rw-r--r--src/module/integrated/version_checking_module/CMakeLists.txt9
-rw-r--r--src/pinentry/CMakeLists.txt9
-rw-r--r--src/pinentry/pinentry.cpp8
-rw-r--r--src/pinentry/qti18n.cpp2
-rw-r--r--src/ui/CMakeLists.txt12
-rw-r--r--src/ui/GpgFrontendUIInit.cpp1
-rw-r--r--src/ui/dialog/GeneralDialog.h2
-rw-r--r--src/ui/dialog/import_export/KeyImportDetailDialog.cpp2
-rw-r--r--src/ui/dialog/import_export/KeyImportDetailDialog.h2
-rw-r--r--src/ui/dialog/keypair_details/KeyPairOperaTab.cpp5
-rw-r--r--src/ui/dialog/settings/SettingsDialog.cpp4
-rw-r--r--src/ui/function/RaisePinentry.cpp8
-rw-r--r--src/ui/main_window/GeneralMainWindow.cpp88
-rw-r--r--src/ui/main_window/GeneralMainWindow.h20
-rw-r--r--src/ui/main_window/MainWindow.cpp1
-rw-r--r--src/ui/widgets/FileTreeView.cpp2
29 files changed, 487 insertions, 177 deletions
diff --git a/.github/workflows/release-qt5.yml b/.github/workflows/release-qt5.yml
new file mode 100644
index 00000000..2a9336a1
--- /dev/null
+++ b/.github/workflows/release-qt5.yml
@@ -0,0 +1,76 @@
+name: Build & Package Qt5
+
+on:
+ push:
+ branches: [ main, 'develop' ]
+ paths-ignore:
+ - 'resource/locale/**'
+ - 'manual/**'
+ - '**.md'
+ pull_request:
+ branches: [ main, 'develop' ]
+ paths-ignore:
+ - 'resource/locale/**'
+ - 'manual/**'
+ - '**.md'
+
+env:
+ # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
+ BUILD_TYPE: Release
+ EXECUTABLE_OUTPUT_PATH: ./
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ os: [ 'windows-2019' ]
+ runs-on: ${{ matrix.os }}
+ continue-on-error: true
+ steps:
+ - name: Set git to use LF(Windows) or CRLF(MacOS) line endings
+ run: |
+ git config --global core.autocrlf false
+ git config --global core.eol lf
+ if: matrix.os == 'windows-2019'
+
+ - uses: actions/checkout@v3
+ with:
+ lfs: 'false'
+ submodules: recursive
+
+ - name: Get Short SHA of Commit
+ id: vars
+ run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
+
+ - name: Set up MinGW (Windows)
+ uses: msys2/setup-msys2@v2
+ with:
+ install: git msys2-devel base-devel binutils mingw-w64-x86_64-toolchain
+ release: false
+ if: matrix.os == 'windows-2019'
+
+ - name: Set up Dependence (Windows)
+ shell: msys2 {0}
+ run: |
+ pacman --noconfirm -S --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake autoconf
+ pacman --noconfirm -S --needed make texinfo automake
+ pacman --noconfirm -S --needed mingw-w64-x86_64-qt5 libintl msys2-runtime-devel gettext-devel mingw-w64-x86_64-gpgme
+ pacman --noconfirm -S --needed mingw-w64-x86_64-ninja mingw-w64-x86_64-gnupg mingw-w64-x86_64-libarchive
+ if: matrix.os == 'windows-2019'
+
+ - name: Configure CMake & Build Binary(Windows)
+ shell: msys2 {0}
+ run: |
+ cd $(echo "/${{github.workspace}}" | sed 's/\\/\//g' | sed 's/://')
+ mkdir build && cd build
+ cmake -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_STABLE=ON -DGPGFRONTEND_QT5_BUILD=ON ..
+ # Build your program with the given configuration
+ cmake --build . --config ${{env.BUILD_TYPE}} -- -j 2
+ if: matrix.os == 'windows-2019'
+
+ - name: Upload Artifact(Windows)
+ uses: actions/upload-artifact@master
+ with:
+ name: gpgfrontend-${{matrix.os}}-${{env.BUILD_TYPE}}-${{ github.sha }}
+ path: ${{github.workspace}}/build/artifacts/*
+ if: matrix.os == 'windows-2019'
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 44c64140..2819895f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,6 +64,7 @@ option(GPGFRONTEND_BUILD_TYPE_TEST_ALL
"Generate a graphical interface with all functions" OFF)
option(GPGFRONTEND_BUILD_TYPE_STABLE
"Generate release version" ON)
+option(GPGFRONTEND_QT5_BUILD "Swith to Qt5 building mode" OFF)
option(GPGFRONTEND_GENERATE_LINUX_INSTALL_SOFTWARE "Generate an installable version" OFF)
option(GPGFRONTEND_CONFIGURE_FOR_XCODE_BUILD "Generate a version that can be successfully compiled and packaged in Xcode" OFF)
option(GPGFRONTEND_XCODE_TEAM_ID "GpgFrontend Apple Team ID" "NONE")
@@ -330,6 +331,12 @@ else ()
set(APP_INSTALL_FLAG BUNDLE)
endif ()
+if (GPGFRONTEND_QT5_BUILD)
+ add_compile_definitions(QT5_BUILD)
+else()
+ add_compile_definitions(QT6_BUILD)
+endif()
+
# Basic ENV Configure
set(BASIC_ENV_CONFIG 1)
set(QT_MOC_CONFIG 1)
diff --git a/resource/lfs/locale/ts/GpgFrontend.de_DE.ts b/resource/lfs/locale/ts/GpgFrontend.de_DE.ts
index e6e52b5c..f43e0d1a 100644
--- a/resource/lfs/locale/ts/GpgFrontend.de_DE.ts
+++ b/resource/lfs/locale/ts/GpgFrontend.de_DE.ts
@@ -74,7 +74,7 @@
<message>
<location filename="../../../../src/core/function/result_analyse/GpgDecryptResultAnalyse.cpp" line="83"/>
<source>German Encryption Standards</source>
- <translation>Allgemeine Verschlüsselungsstandards</translation>
+ <translation>Deutsche Verschlüsselungsstandards</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgDecryptResultAnalyse.cpp" line="91"/>
@@ -202,7 +202,7 @@
<message>
<location filename="../../../../src/core/function/result_analyse/GpgSignResultAnalyse.cpp" line="89"/>
<source>Subkey</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Unterschlüssel</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgSignResultAnalyse.cpp" line="92"/>
@@ -212,18 +212,18 @@
<message>
<location filename="../../../../src/core/function/result_analyse/GpgSignResultAnalyse.cpp" line="94"/>
<source>Key Create Date</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Schlüssel Erstellungsdatum</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgSignResultAnalyse.cpp" line="99"/>
<source>&lt;unknown&gt;</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">&lt;unbekannt&gt;</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgSignResultAnalyse.cpp" line="105"/>
<location filename="../../../../src/core/function/result_analyse/GpgSignResultAnalyse.cpp" line="109"/>
<source>Sign Date</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Unterschrift Datum</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgSignResultAnalyse.cpp" line="130"/>
@@ -386,12 +386,12 @@
<message>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="109"/>
<source>Tips</source>
- <translation type="unfinished"></translation>
+ <translation>Hinweise</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="110"/>
<source>Adjust Trust Level to make it Fully Vaild</source>
- <translation type="unfinished"></translation>
+ <translation>Anpassen der Vertrauensstufe, um sie vollständig zu sichern</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="184"/>
@@ -403,7 +403,7 @@
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="186"/>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="229"/>
<source>&lt;unknown&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;unbekannt&gt;</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="192"/>
@@ -411,28 +411,28 @@
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="237"/>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="239"/>
<source>Sign Date</source>
- <translation type="unfinished"></translation>
+ <translation>Unterschrift Datum</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="217"/>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="220"/>
<source>Key ID</source>
- <translation type="unfinished">Schlüssel-ID</translation>
+ <translation>Schlüssel-ID</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="218"/>
<source>Subkey</source>
- <translation type="unfinished"></translation>
+ <translation>Unterschlüssel</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="221"/>
<source>Primary Key</source>
- <translation type="unfinished">Primärschlüssel</translation>
+ <translation>Primärschlüssel</translation>
</message>
<message>
<location filename="../../../../src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp" line="223"/>
<source>Key Create Date</source>
- <translation type="unfinished"></translation>
+ <translation>Schlüssel Erstellungsdatum</translation>
</message>
<message>
<source>(Adjust Trust Level to make it Fully Vaild)</source>
@@ -704,7 +704,7 @@
<message>
<location filename="../../../../src/ui/UserInterfaceUtils.cpp" line="251"/>
<source>Gpg Operation succeed.</source>
- <translation>GPG Vorgang abgeschlossen.</translation>
+ <translation>Gpg-Verarbeitung erfolgreich.</translation>
</message>
<message>
<location filename="../../../../src/ui/UserInterfaceUtils.cpp" line="261"/>
@@ -754,7 +754,7 @@ Beschrei: %3</translation>
<message>
<location filename="../../../../src/ui/UserInterfaceUtils.cpp" line="295"/>
<source>The target file is too large for a keyring.</source>
- <translation type="unfinished"></translation>
+ <translation>Die Zieldatei ist zu groß für einen Schlüsselring.</translation>
</message>
<message>
<location filename="../../../../src/ui/UserInterfaceUtils.cpp" line="301"/>
@@ -1143,7 +1143,7 @@ Beschrei: %3</translation>
<message>
<location filename="../../../../src/ui/widgets/FileTreeView.cpp" line="393"/>
<source>Calculating</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Berechnen</translation>
</message>
</context>
<context>
@@ -1226,7 +1226,7 @@ Beschrei: %3</translation>
<message>
<location filename="../../../../src/ui/dialog/settings/SettingsGeneral.cpp" line="69"/>
<source>Reveal in File Explorer</source>
- <translation type="unfinished"></translation>
+ <translation>Im Datei-Explorer öffnen</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/settings/SettingsGeneral.cpp" line="88"/>
@@ -1264,7 +1264,7 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/gnupg/GnuPGControllerDialog.cpp" line="49"/>
<source>Use Binary Mode for File Operations</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Binärmodus für Dateioperationen verwenden</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/gnupg/GnuPGControllerDialog.cpp" line="51"/>
@@ -1274,7 +1274,7 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/gnupg/GnuPGControllerDialog.cpp" line="52"/>
<source>Enable GpgME Debug Log</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">GpgME-Debug-Log einschalten</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/gnupg/GnuPGControllerDialog.cpp" line="53"/>
@@ -1299,7 +1299,7 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/gnupg/GnuPGControllerDialog.cpp" line="60"/>
<source>Restart Gpg Agent on start</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Gpg-Agent beim Start neu starten</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/gnupg/GnuPGControllerDialog.cpp" line="64"/>
@@ -1399,22 +1399,22 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/help/GnupgTab.cpp" line="48"/>
<source>Directories</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Verzeichnisse</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/help/GnupgTab.cpp" line="49"/>
<source>Options</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Optionen</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/help/GnupgTab.cpp" line="68"/>
<source>Directory Type</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Verzeichnis Typ</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/help/GnupgTab.cpp" line="68"/>
<source>Path</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Pfad</translation>
</message>
<message>
<source>Configurations</source>
@@ -1512,7 +1512,7 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="89"/>
<source>GpgFrontend is an easy-to-use, compact, cross-platform, and installation-free GnuPG Frontend.It visualizes most of the common operations of GnuPG.GpgFrontend is licensed under the GPLv3</source>
- <translation type="unfinished">GpgFrontend ist ein benutzerfreundliches, kompaktes, plattformübergreifendes und installationsfreies GnuPG-Frontend. Es visualisiert die meisten gängigen Operationen von GnuPG. GpgFrontend ist unter der GPLv3 lizenziert.</translation>
+ <translation>GpgFrontend ist ein benutzerfreundliches, kompaktes, plattformübergreifendes und installationsfreies GnuPG-Frontend. Es visualisiert die meisten gängigen Operationen von GnuPG. GpgFrontend ist unter der GPLv3 lizenziert.</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/help/AboutDialog.cpp" line="95"/>
@@ -1808,7 +1808,7 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/import_export/KeyImportDetailDialog.cpp" line="123"/>
<source>New Revocations</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Neue Widerrufe</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/import_export/KeyImportDetailDialog.cpp" line="139"/>
@@ -2339,7 +2339,7 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/main_window/KeyMgmt.cpp" line="550"/>
<source>The target file is too large for a key package.</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Die Zieldatei ist zu groß für ein Schlüsselpaket.</translation>
</message>
<message>
<location filename="../../../../src/ui/main_window/KeyMgmt.cpp" line="555"/>
@@ -2354,12 +2354,12 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/main_window/KeyMgmt.cpp" line="574"/>
<source>The target file is too large for a key package passphrase.</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Die Zieldatei ist zu groß für eine Schlüsselpaket-Passphrase.</translation>
</message>
<message>
<location filename="../../../../src/ui/main_window/KeyMgmt.cpp" line="580"/>
<source>Importing</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Importieren</translation>
</message>
<message>
<location filename="../../../../src/ui/main_window/KeyMgmt.cpp" line="596"/>
@@ -2613,7 +2613,7 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="101"/>
<source>Revoke Certificate Operation</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Zertifikat widerrufen Operation</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="114"/>
@@ -2643,7 +2643,7 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="182"/>
<source>Import Revoke Certificate</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Zertifikat importieren widerrufen</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="209"/>
@@ -2781,45 +2781,45 @@ This will result in loss of all cached form positions, statuses, key servers, et
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="399"/>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="411"/>
<source>Import Key Revocation Certificate</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Schlüssel-Widerrufs-Zertifikat importieren</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="400"/>
<source>You are about to import the</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Sie sind dabei, das</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="401"/>
<source>REVOCATION CERTIFICATE</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Schlüssel-Widerrufs-Zertifikat importieren</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="402"/>
<source>A successful import will result in the key being irreversibly revoked.</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Ein erfolgreicher Import führt dazu, dass der Schlüssel unwiderruflich widerrufen wird.</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="404"/>
<source>Do you REALLY want to execute this operation?</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Wollen Sie diesen Vorgang WIRKLICH durchführen?</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="420"/>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="429"/>
- <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="437"/>
+ <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="442"/>
<source>Error</source>
<translation type="unfinished">Fehler</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="421"/>
- <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="438"/>
+ <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="443"/>
<source>Cannot open this file. Please make sure that this is a regular file and it&apos;s readable.</source>
<translation type="unfinished">Kann diese Datei nicht öffnen. Bitte stellen Sie sicher, dass es sich um eine reguläre, lesbare Datei handelt.</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="430"/>
<source>The target file is too large for a key revocation certificate.</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">Die Zieldatei ist zu groß für ein Schlüsselwiderrufszertifikat.</translation>
</message>
</context>
<context>
@@ -3621,13 +3621,13 @@ This will result in loss of all cached form positions, statuses, key servers, et
<context>
<name>GpgFrontend::UI::MainWindow</name>
<message>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="155"/>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="158"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="156"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="159"/>
<source>Critical error occur while loading GpgFrontend.</source>
<translation type="unfinished">Beim Laden von GpgFrontend ist ein kritischer Fehler aufgetreten.</translation>
</message>
<message>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="157"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="158"/>
<source>Loading Failed</source>
<translation type="unfinished">Laden fehlgeschlagen</translation>
</message>
@@ -4838,9 +4838,8 @@ Fals Daten und Signatur in einer Datei COMBINIERT sind, LASSEN SIE DIES LEER: </
<context>
<name>GpgFrontend::UI::RaisePinentry</name>
<message>
- <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="67"/>
<source>Repeat PIN:</source>
- <translation>PIN wiederholen:</translation>
+ <translation type="vanished">PIN wiederholen:</translation>
</message>
<message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="68"/>
@@ -4853,14 +4852,27 @@ Fals Daten und Signatur in einer Datei COMBINIERT sind, LASSEN SIE DIES LEER: </
<translation>Passwortphrase verbergen</translation>
</message>
<message>
- <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="71"/>
<source>Given PIN was wrong. Please retry.</source>
- <translation>Eingegebene PIN ist ungültig. Bitte erneut versuchen.</translation>
+ <translation type="vanished">Eingegebene PIN ist ungültig. Bitte erneut versuchen.</translation>
</message>
<message>
- <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="74"/>
<source>PIN:</source>
- <translation>PIN:</translation>
+ <translation type="vanished">PIN:</translation>
+ </message>
+ <message>
+ <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="67"/>
+ <source>Repeat Passphrase:</source>
+ <translation>Passphrase wiederholen:</translation>
+ </message>
+ <message>
+ <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="71"/>
+ <source>Given Passphrase was wrong. Please retry.</source>
+ <translation>Die angegebene Passphrase war falsch. Bitte versuchen Sie es erneut.</translation>
+ </message>
+ <message>
+ <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="74"/>
+ <source>Passphrase:</source>
+ <translation>Passphrase:</translation>
</message>
<message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="84"/>
@@ -4875,7 +4887,7 @@ Fals Daten und Signatur in einer Datei COMBINIERT sind, LASSEN SIE DIES LEER: </
<message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="91"/>
<source>Bundled Pinentry</source>
- <translation type="unfinished"></translation>
+ <translation>Eingabe Passphrase</translation>
</message>
<message>
<source>Buddled Pinentry</source>
@@ -4884,12 +4896,12 @@ Fals Daten und Signatur in einer Datei COMBINIERT sind, LASSEN SIE DIES LEER: </
<message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="95"/>
<source>Confirm</source>
- <translation type="unfinished">Bestätigen</translation>
+ <translation>Bestätigen</translation>
</message>
<message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="96"/>
<source>Cancel</source>
- <translation type="unfinished">Abbrechen</translation>
+ <translation>Abbrechen</translation>
</message>
</context>
<context>
@@ -5545,32 +5557,32 @@ Fals Daten und Signatur in einer Datei COMBINIERT sind, LASSEN SIE DIES LEER: </
<message>
<location filename="../../../../src/cmd.cpp" line="54"/>
<source>Build DateTime: </source>
- <translation type="unfinished">Build DateTime:</translation>
+ <translation type="unfinished">Build DateTime: </translation>
</message>
<message>
<location filename="../../../../src/cmd.cpp" line="55"/>
<source>Build Version: </source>
- <translation type="unfinished">Build Version:</translation>
+ <translation type="unfinished">Build Version: </translation>
</message>
<message>
<location filename="../../../../src/cmd.cpp" line="56"/>
<source>Source Code Version: </source>
- <translation type="unfinished">Sourcecode Version:</translation>
+ <translation type="unfinished">Sourcecode Version: </translation>
</message>
<message>
<location filename="../../../../src/core/GpgCoreInit.cpp" line="294"/>
<source>GpgME initiation failed</source>
- <translation type="unfinished"></translation>
+ <translation>GpgME-Initiation fehlgeschlagen</translation>
</message>
<message>
<location filename="../../../../src/core/GpgCoreInit.cpp" line="397"/>
<source>GpgME Context initiation failed</source>
- <translation type="unfinished"></translation>
+ <translation>GpgME-Kontext-Initiation fehlgeschlagen</translation>
</message>
<message>
<location filename="../../../../src/core/GpgCoreInit.cpp" line="406"/>
<source>Gpg Key Detabase initiation failed</source>
- <translation type="unfinished"></translation>
+ <translation>Gpg Key Detabase initiation fehlgeschlagen</translation>
</message>
<message>
<location filename="../../../../src/core/utils/IOUtils.cpp" line="89"/>
@@ -5581,7 +5593,7 @@ Fals Daten und Signatur in einer Datei COMBINIERT sind, LASSEN SIE DIES LEER: </
<location filename="../../../../src/core/utils/IOUtils.cpp" line="90"/>
<location filename="../../../../src/core/utils/IOUtils.cpp" line="125"/>
<source>Filename</source>
- <translation type="unfinished"></translation>
+ <translation>Dateiname</translation>
</message>
<message>
<location filename="../../../../src/core/utils/IOUtils.cpp" line="90"/>
@@ -5598,12 +5610,12 @@ Fals Daten und Signatur in einer Datei COMBINIERT sind, LASSEN SIE DIES LEER: </
<location filename="../../../../src/core/utils/IOUtils.cpp" line="94"/>
<location filename="../../../../src/core/utils/IOUtils.cpp" line="98"/>
<source>File Size</source>
- <translation type="unfinished"></translation>
+ <translation>Dateigröße</translation>
</message>
<message>
<location filename="../../../../src/core/utils/IOUtils.cpp" line="123"/>
<source>Error: cannot read target file</source>
- <translation type="unfinished"></translation>
+ <translation>Fehler: Zieldatei kann nicht gelesen werden</translation>
</message>
<message>
<location filename="../../../../src/core/utils/IOUtils.cpp" line="156"/>
@@ -5623,15 +5635,15 @@ Fals Daten und Signatur in einer Datei COMBINIERT sind, LASSEN SIE DIES LEER: </
<message>
<location filename="../../../../src/core/utils/IOUtils.cpp" line="171"/>
<source>Success</source>
- <translation type="unfinished"></translation>
+ <translation>erfolgreich</translation>
</message>
<message>
- <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="53"/>
+ <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="54"/>
<source>Loading Gnupg Info...</source>
<translation type="unfinished">Gnupg-Info wird geladen...</translation>
</message>
<message>
- <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="54"/>
+ <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="55"/>
<source>If this process is too slow, please set the key server address appropriately in the gnupg configuration file (depending on the network situation in your country or region).</source>
<translation type="unfinished">Sollte dieser Vorgang zu langsam sein, stellen Sie bitte die Keyserver-Adresse entsprechend in der gnupg-Konfigurationsdatei ein (abhängig von der Netzwerksituation in Ihrem Land oder Ihrer Region).</translation>
</message>
diff --git a/resource/lfs/locale/ts/GpgFrontend.fr_FR.ts b/resource/lfs/locale/ts/GpgFrontend.fr_FR.ts
index 5f676fcc..8ae8f7b7 100644
--- a/resource/lfs/locale/ts/GpgFrontend.fr_FR.ts
+++ b/resource/lfs/locale/ts/GpgFrontend.fr_FR.ts
@@ -2794,13 +2794,13 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="420"/>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="429"/>
- <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="437"/>
+ <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="442"/>
<source>Error</source>
<translation type="unfinished">Erreur</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="421"/>
- <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="438"/>
+ <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="443"/>
<source>Cannot open this file. Please make sure that this is a regular file and it&apos;s readable.</source>
<translation type="unfinished"></translation>
</message>
@@ -3609,13 +3609,13 @@ This will result in loss of all cached form positions, statuses, key servers, et
<context>
<name>GpgFrontend::UI::MainWindow</name>
<message>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="155"/>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="158"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="156"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="159"/>
<source>Critical error occur while loading GpgFrontend.</source>
<translation type="unfinished">Une erreur critique s&apos;est produite lors du chargement de GpgFrontend.</translation>
</message>
<message>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="157"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="158"/>
<source>Loading Failed</source>
<translation type="unfinished">Échec du chargement</translation>
</message>
@@ -4821,11 +4821,6 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<context>
<name>GpgFrontend::UI::RaisePinentry</name>
<message>
- <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="67"/>
- <source>Repeat PIN:</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="68"/>
<source>Show passphrase</source>
<translation type="unfinished"></translation>
@@ -4836,13 +4831,18 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<translation type="unfinished"></translation>
</message>
<message>
+ <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="67"/>
+ <source>Repeat Passphrase:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="71"/>
- <source>Given PIN was wrong. Please retry.</source>
+ <source>Given Passphrase was wrong. Please retry.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="74"/>
- <source>PIN:</source>
+ <source>Passphrase:</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -5537,12 +5537,12 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="53"/>
+ <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="54"/>
<source>Loading Gnupg Info...</source>
<translation type="unfinished">Chargement des informations sur Gnupg...</translation>
</message>
<message>
- <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="54"/>
+ <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="55"/>
<source>If this process is too slow, please set the key server address appropriately in the gnupg configuration file (depending on the network situation in your country or region).</source>
<translation type="unfinished">Si ce processus est trop lent, veuillez définir l&apos;adresse du serveur de clés de manière appropriée dans le fichier de configuration gnupg (en fonction de la situation du réseau dans votre pays ou région).</translation>
</message>
diff --git a/resource/lfs/locale/ts/GpgFrontend.it_IT.ts b/resource/lfs/locale/ts/GpgFrontend.it_IT.ts
index 4122612a..1024f4a1 100644
--- a/resource/lfs/locale/ts/GpgFrontend.it_IT.ts
+++ b/resource/lfs/locale/ts/GpgFrontend.it_IT.ts
@@ -2790,13 +2790,13 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="420"/>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="429"/>
- <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="437"/>
+ <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="442"/>
<source>Error</source>
<translation type="unfinished">Errore</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="421"/>
- <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="438"/>
+ <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="443"/>
<source>Cannot open this file. Please make sure that this is a regular file and it&apos;s readable.</source>
<translation type="unfinished"></translation>
</message>
@@ -3605,13 +3605,13 @@ This will result in loss of all cached form positions, statuses, key servers, et
<context>
<name>GpgFrontend::UI::MainWindow</name>
<message>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="155"/>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="158"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="156"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="159"/>
<source>Critical error occur while loading GpgFrontend.</source>
<translation type="unfinished">Si è verificato un errore critico durante il caricamento di GpgFrontend.</translation>
</message>
<message>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="157"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="158"/>
<source>Loading Failed</source>
<translation type="unfinished">Caricamento non riuscito</translation>
</message>
@@ -4817,11 +4817,6 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<context>
<name>GpgFrontend::UI::RaisePinentry</name>
<message>
- <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="67"/>
- <source>Repeat PIN:</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="68"/>
<source>Show passphrase</source>
<translation type="unfinished"></translation>
@@ -4832,13 +4827,18 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<translation type="unfinished"></translation>
</message>
<message>
+ <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="67"/>
+ <source>Repeat Passphrase:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="71"/>
- <source>Given PIN was wrong. Please retry.</source>
+ <source>Given Passphrase was wrong. Please retry.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="74"/>
- <source>PIN:</source>
+ <source>Passphrase:</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -5533,12 +5533,12 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="53"/>
+ <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="54"/>
<source>Loading Gnupg Info...</source>
<translation type="unfinished">Caricamento informazioni Gnupg...</translation>
</message>
<message>
- <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="54"/>
+ <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="55"/>
<source>If this process is too slow, please set the key server address appropriately in the gnupg configuration file (depending on the network situation in your country or region).</source>
<translation type="unfinished">Se questo processo è troppo lento, impostare l&apos;indirizzo del server delle chiavi in modo appropriato nel file di configurazione di gnupg (a seconda della situazione della rete nel proprio paese o regione).</translation>
</message>
diff --git a/resource/lfs/locale/ts/GpgFrontend.zh_CN.ts b/resource/lfs/locale/ts/GpgFrontend.zh_CN.ts
index 476f3807..a67c2a5e 100644
--- a/resource/lfs/locale/ts/GpgFrontend.zh_CN.ts
+++ b/resource/lfs/locale/ts/GpgFrontend.zh_CN.ts
@@ -1779,32 +1779,32 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/import_export/KeyImportDetailDialog.cpp" line="88"/>
<source>Imported</source>
- <translation type="unfinished">导入</translation>
+ <translation type="unfinished">导入的密钥</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/import_export/KeyImportDetailDialog.cpp" line="95"/>
<source>Not Imported</source>
- <translation type="unfinished">未导入</translation>
+ <translation type="unfinished">未导入的密钥</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/import_export/KeyImportDetailDialog.cpp" line="102"/>
<source>Private Read</source>
- <translation type="unfinished">私有且可读</translation>
+ <translation type="unfinished">读取的私钥</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/import_export/KeyImportDetailDialog.cpp" line="110"/>
<source>Private Imported</source>
- <translation type="unfinished">私有并导入</translation>
+ <translation type="unfinished">导入的私钥</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/import_export/KeyImportDetailDialog.cpp" line="117"/>
<source>Private Unchanged</source>
- <translation type="unfinished">私有未变更</translation>
+ <translation type="unfinished">未变更的私钥</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/import_export/KeyImportDetailDialog.cpp" line="123"/>
<source>New Revocations</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">新的吊销</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/import_export/KeyImportDetailDialog.cpp" line="139"/>
@@ -2331,22 +2331,22 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/main_window/KeyMgmt.cpp" line="550"/>
<source>The target file is too large for a key package.</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">目标文件对于密钥包来说太大。</translation>
</message>
<message>
<location filename="../../../../src/ui/main_window/KeyMgmt.cpp" line="555"/>
<source>Import Key Package Passphrase File</source>
- <translation type="unfinished">导入密钥包密码文件</translation>
+ <translation type="unfinished">导入密钥包口令文件</translation>
</message>
<message>
<location filename="../../../../src/ui/main_window/KeyMgmt.cpp" line="556"/>
<source>Key Package Passphrase File</source>
- <translation type="unfinished">密钥包密码文件</translation>
+ <translation type="unfinished">密钥包口令文件</translation>
</message>
<message>
<location filename="../../../../src/ui/main_window/KeyMgmt.cpp" line="574"/>
<source>The target file is too large for a key package passphrase.</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">目标文件对于密钥包口令来说太大。</translation>
</message>
<message>
<location filename="../../../../src/ui/main_window/KeyMgmt.cpp" line="580"/>
@@ -2798,13 +2798,13 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="420"/>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="429"/>
- <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="437"/>
+ <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="442"/>
<source>Error</source>
<translation>错误</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="421"/>
- <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="438"/>
+ <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="443"/>
<source>Cannot open this file. Please make sure that this is a regular file and it&apos;s readable.</source>
<translation>无法打开此文件。请确保这是一个普通文件,并且有读取权限。</translation>
</message>
@@ -3613,13 +3613,13 @@ This will result in loss of all cached form positions, statuses, key servers, et
<context>
<name>GpgFrontend::UI::MainWindow</name>
<message>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="155"/>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="158"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="156"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="159"/>
<source>Critical error occur while loading GpgFrontend.</source>
<translation type="unfinished">加载 GpgFrontend 时发生严重错误。</translation>
</message>
<message>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="157"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="158"/>
<source>Loading Failed</source>
<translation type="unfinished">加载失败</translation>
</message>
@@ -4826,9 +4826,8 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<context>
<name>GpgFrontend::UI::RaisePinentry</name>
<message>
- <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="67"/>
<source>Repeat PIN:</source>
- <translation>重复密码:</translation>
+ <translation type="vanished">重复密码:</translation>
</message>
<message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="68"/>
@@ -4841,13 +4840,26 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<translation type="unfinished">隐藏密码</translation>
</message>
<message>
- <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="71"/>
<source>Given PIN was wrong. Please retry.</source>
- <translation type="unfinished">所给的密码有误,请重新输入。</translation>
+ <translation type="obsolete">所给的密码有误,请重新输入。</translation>
</message>
<message>
- <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="74"/>
<source>PIN:</source>
+ <translation type="obsolete">密码:</translation>
+ </message>
+ <message>
+ <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="67"/>
+ <source>Repeat Passphrase:</source>
+ <translation type="unfinished">重新输入密码:</translation>
+ </message>
+ <message>
+ <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="71"/>
+ <source>Given Passphrase was wrong. Please retry.</source>
+ <translation type="unfinished">密码错误。请重试。</translation>
+ </message>
+ <message>
+ <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="74"/>
+ <source>Passphrase:</source>
<translation type="unfinished">密码:</translation>
</message>
<message>
@@ -5546,12 +5558,12 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<translation>源代码版本: </translation>
</message>
<message>
- <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="53"/>
+ <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="54"/>
<source>Loading Gnupg Info...</source>
<translation type="unfinished">正在加载 Gnupg 信息...</translation>
</message>
<message>
- <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="54"/>
+ <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="55"/>
<source>If this process is too slow, please set the key server address appropriately in the gnupg configuration file (depending on the network situation in your country or region).</source>
<translation type="unfinished">如果此过程太慢,请在 gnupg 配置文件中适当设置密钥服务器地址(取决于您所在国家或地区的网络情况)。</translation>
</message>
diff --git a/resource/lfs/locale/ts/GpgFrontend.zh_TW.ts b/resource/lfs/locale/ts/GpgFrontend.zh_TW.ts
index b94379ff..989a19e8 100644
--- a/resource/lfs/locale/ts/GpgFrontend.zh_TW.ts
+++ b/resource/lfs/locale/ts/GpgFrontend.zh_TW.ts
@@ -2790,13 +2790,13 @@ This will result in loss of all cached form positions, statuses, key servers, et
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="420"/>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="429"/>
- <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="437"/>
+ <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="442"/>
<source>Error</source>
<translation type="unfinished">錯誤</translation>
</message>
<message>
<location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="421"/>
- <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="438"/>
+ <location filename="../../../../src/ui/dialog/keypair_details/KeyPairOperaTab.cpp" line="443"/>
<source>Cannot open this file. Please make sure that this is a regular file and it&apos;s readable.</source>
<translation type="unfinished"></translation>
</message>
@@ -3605,13 +3605,13 @@ This will result in loss of all cached form positions, statuses, key servers, et
<context>
<name>GpgFrontend::UI::MainWindow</name>
<message>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="155"/>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="158"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="156"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="159"/>
<source>Critical error occur while loading GpgFrontend.</source>
<translation type="unfinished">加載 GpgFrontend 時發生嚴重錯誤。</translation>
</message>
<message>
- <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="157"/>
+ <location filename="../../../../src/ui/main_window/MainWindow.cpp" line="158"/>
<source>Loading Failed</source>
<translation type="unfinished">加載失敗</translation>
</message>
@@ -4817,11 +4817,6 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<context>
<name>GpgFrontend::UI::RaisePinentry</name>
<message>
- <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="67"/>
- <source>Repeat PIN:</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="68"/>
<source>Show passphrase</source>
<translation type="unfinished"></translation>
@@ -4832,13 +4827,18 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<translation type="unfinished"></translation>
</message>
<message>
+ <location filename="../../../../src/ui/function/RaisePinentry.cpp" line="67"/>
+ <source>Repeat Passphrase:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="71"/>
- <source>Given PIN was wrong. Please retry.</source>
+ <source>Given Passphrase was wrong. Please retry.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../../src/ui/function/RaisePinentry.cpp" line="74"/>
- <source>PIN:</source>
+ <source>Passphrase:</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -5533,12 +5533,12 @@ If Data And Signature is COMBINED within a single file, KEEP THIS EMPTY: </sourc
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="53"/>
+ <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="54"/>
<source>Loading Gnupg Info...</source>
<translation type="unfinished">正在加載 Gnupg 信息...</translation>
</message>
<message>
- <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="54"/>
+ <location filename="../../../../src/ui/GpgFrontendUIInit.cpp" line="55"/>
<source>If this process is too slow, please set the key server address appropriately in the gnupg configuration file (depending on the network situation in your country or region).</source>
<translation type="unfinished">如果此過程太慢,請在 gnupg 組態檔案中適當設定金鑰伺服器位址(取決於您所在國家或地區的網絡情況)。</translation>
</message>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6a7cf4a8..e47e2bae 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -53,9 +53,17 @@ if (APPLE)
endif()
find_package(OpenSSL REQUIRED)
-# Introduce Qt
-# Support Qt version: 6.x
-find_package(Qt6 6 COMPONENTS Core Test Widgets PrintSupport Network Core5Compat LinguistTools REQUIRED)
+
+if(GPGFRONTEND_QT5_BUILD)
+ # Introduce Qt
+ # Support Qt version: 5.15.x
+ find_package(Qt5 5.15 COMPONENTS Core Widgets PrintSupport Network LinguistTools REQUIRED)
+else()
+ # Introduce Qt
+ # Support Qt version: 6.x
+ find_package(Qt6 6 COMPONENTS Core Widgets PrintSupport Network Core5Compat LinguistTools REQUIRED)
+endif()
+
# Qt configuration
set(CMAKE_AUTOMOC ON)
@@ -277,7 +285,13 @@ if (BUILD_APPLICATION)
list(APPEND ALL_RUNTIME_DEP_PATH_LIST ${_libExEPath})
set(ALL_RUNTIME_DLL_FILES "")
- list(APPEND ALL_RUNTIME_DLL_FILES "Qt6Core.dll;Qt6Core5Compat.dll;Qt6Gui.dll;Qt6Network.dll;Qt6PrintSupport.dll;Qt6Svg.dll;Qt6Widgets.dll;libbrotlicommon.dll;libbrotlidec.dll;libdouble-conversion.dll;libzstd.dll;libmd4c.dll;")
+
+ if(GPGFRONTEND_QT5_BUILD)
+ list(APPEND ALL_RUNTIME_DLL_FILES "Qt5Core.dll;Qt5Gui.dll;Qt5Network.dll;Qt5PrintSupport.dll;Qt5Svg.dll;Qt5Widgets.dll;libbrotlicommon.dll;libbrotlidec.dll;libdouble-conversion.dll;libzstd.dll;libmd4c.dll;")
+ else()
+ list(APPEND ALL_RUNTIME_DLL_FILES "Qt6Core.dll;Qt6Core5Compat.dll;Qt6Gui.dll;Qt6Network.dll;Qt6PrintSupport.dll;Qt6Svg.dll;Qt6Widgets.dll;libbrotlicommon.dll;libbrotlidec.dll;libdouble-conversion.dll;libzstd.dll;libmd4c.dll;")
+ endif()
+
# find the other dlls
foreach (_dllFileName ${ALL_RUNTIME_DLL_FILES})
message(STATUS "DLL FILE ${_dllFileName}")
@@ -447,22 +461,56 @@ if (BUILD_APPLICATION)
"${LOCALE_TS_PATH}/GpgFrontend.zh_TW.ts"
"${LOCALE_TS_PATH}/GpgFrontend.it_IT.ts")
file(GLOB_RECURSE ALL_SOURCE_FILES RELACTIVE ${CMAKE_SOURCE_DIR}/src/*.cpp)
- qt_add_translations(${AppName}
- RESOURCE_PREFIX "/i18n"
- TS_FILES ${TS_FILES}
- SOURCES ${ALL_SOURCE_FILES}
- INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/src)
-
- file(GLOB QT_TRANSLATIONS_TS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/third_party/qttranslations/translations/*.ts)
- list(FILTER QT_TRANSLATIONS_TS INCLUDE REGEX ".*(qt|qtbase)_.*\.ts$")
- add_custom_target(qttranslations ALL)
- qt_add_lrelease(qttranslations
- TS_FILES ${QT_TRANSLATIONS_TS}
- QM_FILES_OUTPUT_VARIABLE QT_TRANSLATIONS_QM)
- qt_add_resources(${AppName} "qttranslations"
- PREFIX "/i18n_qt"
- BASE ${CMAKE_CURRENT_BINARY_DIR}
- FILES ${QT_TRANSLATIONS_QM})
+
+ if(GPGFRONTEND_QT5_BUILD)
+ # TODO
+ qt5_add_translation(GF_TRANSLATIONS_QM ${TS_FILES})
+ message(STATUS "GF_TRANSLATIONS_QM ${GF_TRANSLATIONS_QM}")
+
+ set(GF_QM_TRANSLATIONS_RESOURCE_FILE "${CMAKE_CURRENT_BINARY_DIR}/i18n.qrc")
+ file(WRITE ${GF_QM_TRANSLATIONS_RESOURCE_FILE} "<!DOCTYPE RCC>\n<RCC version=\"1.0\">\n <qresource prefix=\"i18n\">\n")
+ foreach(QM_FILE ${GF_TRANSLATIONS_QM})
+ file(RELATIVE_PATH QM_FILENAME ${CMAKE_CURRENT_BINARY_DIR} ${QM_FILE})
+ file(APPEND ${GF_QM_TRANSLATIONS_RESOURCE_FILE} " <file alias=\"${QM_FILENAME}\">${QM_FILE}</file>\n")
+ endforeach()
+ file(APPEND ${GF_QM_TRANSLATIONS_RESOURCE_FILE} " </qresource>\n</RCC>\n")
+ qt5_add_resources(GF_I18N_RESOURCES ${GF_QM_TRANSLATIONS_RESOURCE_FILE})
+
+ file(GLOB QT_TRANSLATIONS_TS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/third_party/qttranslations/translations/*.ts)
+ list(FILTER QT_TRANSLATIONS_TS INCLUDE REGEX ".*(qt|qtbase)_.*\.ts$")
+ qt5_add_translation(QT_TRANSLATIONS_QM ${QT_TRANSLATIONS_TS})
+
+ set(QT_QM_TRANSLATIONS_RESOURCE_FILE "${CMAKE_CURRENT_BINARY_DIR}/qt_i18n.qrc")
+ file(WRITE ${QT_QM_TRANSLATIONS_RESOURCE_FILE} "<!DOCTYPE RCC>\n<RCC version=\"1.0\">\n <qresource prefix=\"qt_i18n\">\n")
+ foreach(QM_FILE ${QT_TRANSLATIONS_QM})
+ file(RELATIVE_PATH QM_FILENAME ${CMAKE_CURRENT_BINARY_DIR} ${QM_FILE})
+ file(APPEND ${QT_QM_TRANSLATIONS_RESOURCE_FILE} " <file alias=\"${QM_FILENAME}\">${QM_FILE}</file>\n")
+ endforeach()
+ file(APPEND ${QT_QM_TRANSLATIONS_RESOURCE_FILE} " </qresource>\n</RCC>\n")
+ qt5_add_resources(GF_I18N_RESOURCES ${QT_QM_TRANSLATIONS_RESOURCE_FILE})
+
+ message(STATUS "GF_I18N_RESOURCES ${GF_I18N_RESOURCES}")
+
+ target_sources(${AppName} PRIVATE ${GF_I18N_RESOURCES})
+ else()
+ qt_add_translations(${AppName}
+ RESOURCE_PREFIX "/i18n"
+ TS_FILES ${TS_FILES}
+ SOURCES ${ALL_SOURCE_FILES}
+ INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/src)
+ file(GLOB QT_TRANSLATIONS_TS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/third_party/qttranslations/translations/*.ts)
+ list(FILTER QT_TRANSLATIONS_TS INCLUDE REGEX ".*(qt|qtbase)_.*\.ts$")
+ add_custom_target(qttranslations ALL)
+ qt_add_lrelease(qttranslations
+ TS_FILES ${QT_TRANSLATIONS_TS}
+ QM_FILES_OUTPUT_VARIABLE QT_TRANSLATIONS_QM)
+ qt_add_resources(${AppName} "qttranslations"
+ PREFIX "/i18n_qt"
+ BASE ${CMAKE_CURRENT_BINARY_DIR}
+ FILES ${QT_TRANSLATIONS_QM})
+ endif()
+
+
endif()
# if building linux package
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index a37ea7ee..b5dd3571 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -99,9 +99,14 @@ endif()
# link libarchive
target_link_libraries(gpgfrontend_core PRIVATE archive)
-
-# link Qt core
-target_link_libraries(gpgfrontend_core PUBLIC Qt6::Core)
+
+if(GPGFRONTEND_QT5_BUILD)
+ # link Qt core
+ target_link_libraries(gpgfrontend_core PUBLIC Qt5::Core)
+else()
+ # link Qt core
+ target_link_libraries(gpgfrontend_core PUBLIC Qt6::Core)
+endif()
# set up pch
target_precompile_headers(gpgfrontend_core
diff --git a/src/core/function/ArchiveFileOperator.cpp b/src/core/function/ArchiveFileOperator.cpp
index 2b76e4ac..475ef434 100644
--- a/src/core/function/ArchiveFileOperator.cpp
+++ b/src/core/function/ArchiveFileOperator.cpp
@@ -143,7 +143,11 @@ void ArchiveFileOperator::NewArchive2DataExchanger(
#endif
QFile file(source_path);
+#ifdef QT5_BUILD
+ if (file.open(QIODevice::ReadOnly)) {
+#else
if (file.open(QIODeviceBase::ReadOnly)) {
+#endif
// turn absolute path to relative path
auto relativ_path_name = base_path.relativeFilePath(source_path);
archive_entry_set_pathname(entry, relativ_path_name.toUtf8());
diff --git a/src/core/function/gpg/GpgCommandExecutor.cpp b/src/core/function/gpg/GpgCommandExecutor.cpp
index 6d24f9bd..66c18ae1 100644
--- a/src/core/function/gpg/GpgCommandExecutor.cpp
+++ b/src/core/function/gpg/GpgCommandExecutor.cpp
@@ -41,7 +41,7 @@ auto BuildTaskFromExecCtx(const GpgCommandExecutor::ExecuteContext &context)
const auto &interact_function = context.int_func;
const auto &cmd_executor_callback = context.cb_func;
- const QString joined_argument = QStringList::fromVector(arguments).join(" ");
+ const QString joined_argument = arguments.join(" ");
GF_CORE_LOG_DEBUG("building task: called cmd {} arguments size: {}", cmd,
arguments.size());
diff --git a/src/core/function/gpg/GpgContext.cpp b/src/core/function/gpg/GpgContext.cpp
index 6523386c..7c84d3c4 100644
--- a/src/core/function/gpg/GpgContext.cpp
+++ b/src/core/function/gpg/GpgContext.cpp
@@ -93,13 +93,23 @@ class GpgContext::Impl {
const char *passphrase_info, int last_was_bad,
int fd) -> gpgme_error_t {
size_t res;
- QString pass = "abcdefg\n";
+#ifdef QT5_BUILD
+ QString pass_qstr = "abcdefg\n";
+ QByteArray pass = pass_qstr.toUtf8();
+#else
+ QString pass = "abcdefg\n";
+#endif
+
auto passpahrase_size = pass.size();
-
size_t off = 0;
do {
+#ifdef QT5_BUILD
+ const char* p_pass = pass.data();
+ res = gpgme_io_write(fd, &p_pass[off], passpahrase_size - off);
+#else
res = gpgme_io_write(fd, &pass[off], passpahrase_size - off);
+#endif
if (res > 0) off += res;
} while (res > 0 && off != passpahrase_size);
diff --git a/src/module/integrated/gnupg_info_gathering_module/GnuPGInfoGatheringModule.cpp b/src/module/integrated/gnupg_info_gathering_module/GnuPGInfoGatheringModule.cpp
index c965ed30..a1e5cd5a 100644
--- a/src/module/integrated/gnupg_info_gathering_module/GnuPGInfoGatheringModule.cpp
+++ b/src/module/integrated/gnupg_info_gathering_module/GnuPGInfoGatheringModule.cpp
@@ -209,8 +209,11 @@ auto GnuPGInfoGatheringModule::Exec(EventRefrernce event) -> int {
getTaskRunner()});
GpgCommandExecutor::ExecuteContexts exec_contexts;
-
+#ifdef QT5_BUILD
+ exec_contexts.push_back(GpgCommandExecutor::ExecuteContext{
+#else
exec_contexts.emplace_back(GpgCommandExecutor::ExecuteContext{
+#endif
gpgconf_path, QStringList{"--list-dirs"},
[this](int exit_code, const QString &p_out, const QString &p_err) {
if (exit_code != 0) return;
@@ -264,7 +267,11 @@ auto GnuPGInfoGatheringModule::Exec(EventRefrernce event) -> int {
continue;
}
+#ifdef QT5_BUILD
+ exec_contexts.push_back(GpgCommandExecutor::ExecuteContext{
+#else
exec_contexts.emplace_back(GpgCommandExecutor::ExecuteContext{
+#endif
gpgconf_path, QStringList{"--list-options", component_info.name},
[this, component_info](int exit_code, const QString &p_out,
const QString &p_err) {
diff --git a/src/module/integrated/version_checking_module/CMakeLists.txt b/src/module/integrated/version_checking_module/CMakeLists.txt
index f122be88..76459b0e 100644
--- a/src/module/integrated/version_checking_module/CMakeLists.txt
+++ b/src/module/integrated/version_checking_module/CMakeLists.txt
@@ -46,8 +46,13 @@ endif ()
target_link_libraries(gpgfrontend_integrated_module_version_checking PRIVATE
gpgfrontend_module_sdk)
-# link Qt
-target_link_libraries(gpgfrontend_integrated_module_version_checking PRIVATE Qt6::Network)
+if(GPGFRONTEND_QT5_BUILD)
+ # link Qt
+ target_link_libraries(gpgfrontend_integrated_module_version_checking PUBLIC Qt5::Network)
+else()
+ # link Qt
+ target_link_libraries(gpgfrontend_integrated_module_version_checking PUBLIC Qt6::Network)
+endif()
# property
set_property(TARGET gpgfrontend_integrated_module_version_checking PROPERTY AUTOMOC ON)
diff --git a/src/pinentry/CMakeLists.txt b/src/pinentry/CMakeLists.txt
index b31e4f05..3145719a 100644
--- a/src/pinentry/CMakeLists.txt
+++ b/src/pinentry/CMakeLists.txt
@@ -37,8 +37,13 @@ add_library(gpgfrontend_pinentry SHARED ${PINENTRY_SOURCE})
target_link_libraries(gpgfrontend_pinentry PUBLIC gpgfrontend_core)
-# link Qt core
-target_link_libraries(gpgfrontend_pinentry PUBLIC Qt6::Widgets)
+if(GPGFRONTEND_QT5_BUILD)
+ # link Qt core
+ target_link_libraries(gpgfrontend_pinentry PUBLIC Qt5::Widgets)
+else()
+ # link Qt core
+ target_link_libraries(gpgfrontend_pinentry PUBLIC Qt6::Widgets)
+endif()
# spdlog
target_link_libraries(gpgfrontend_pinentry PRIVATE spdlog)
diff --git a/src/pinentry/pinentry.cpp b/src/pinentry/pinentry.cpp
index c648aea6..5f233f5d 100644
--- a/src/pinentry/pinentry.cpp
+++ b/src/pinentry/pinentry.cpp
@@ -375,19 +375,19 @@ int pinentry_inq_quality(const QString &passphrase) {
static_cast<int>(has_digit) + static_cast<int>(has_special);
score += variety_count * 10;
- for (size_t i = 0; i < passphrase.length() - 1; ++i) {
+ for (auto i = 0; i < passphrase.length() - 1; ++i) {
if (passphrase[i] == passphrase[i + 1]) {
score -= 5;
}
}
- std::unordered_map<QChar, int> char_count;
+ QHash<QChar, int> char_count;
for (const auto ch : passphrase) {
char_count[ch]++;
}
for (auto &p : char_count) {
- if (p.second > 1) {
- score -= (p.second - 1) * 3;
+ if (p > 1) {
+ score -= (p - 1) * 3;
}
}
diff --git a/src/pinentry/qti18n.cpp b/src/pinentry/qti18n.cpp
index 49c27dd3..198e6cc4 100644
--- a/src/pinentry/qti18n.cpp
+++ b/src/pinentry/qti18n.cpp
@@ -30,7 +30,7 @@ static bool loadCatalog(const QString &catalog, const QLocale &locale) {
auto translator = new QTranslator(QCoreApplication::instance());
if (!translator->load(locale, catalog, QString(),
- QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
+ QLatin1String(":/i18n_qt"))) {
qDebug() << "Loading the" << catalog << "catalog failed for locale"
<< locale;
delete translator;
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index c9c27462..3f0686e2 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -47,9 +47,15 @@ add_library(gpgfrontend_ui SHARED ${UI_SOURCE})
set(_export_file "${CMAKE_CURRENT_SOURCE_DIR}/GpgFrontendUIExport.h")
generate_export_header(gpgfrontend_ui EXPORT_FILE_NAME "${_export_file}")
-# link Qt
-target_link_libraries(gpgfrontend_ui
- Qt6::Network Qt6::PrintSupport Qt6::Test Qt6::Core5Compat)
+if(GPGFRONTEND_QT5_BUILD)
+ # link Qt
+ target_link_libraries(gpgfrontend_ui
+ Qt5::Core Qt5::Widgets Qt5::Network Qt5::PrintSupport)
+else()
+ # link Qt
+ target_link_libraries(gpgfrontend_ui
+ Qt6::Core Qt6::Widgets Qt6::Network Qt6::PrintSupport Qt6::Core5Compat)
+endif()
# link gpgfrontend_core
diff --git a/src/ui/GpgFrontendUIInit.cpp b/src/ui/GpgFrontendUIInit.cpp
index 148402d4..08cf012d 100644
--- a/src/ui/GpgFrontendUIInit.cpp
+++ b/src/ui/GpgFrontendUIInit.cpp
@@ -33,6 +33,7 @@
#include "core/GpgConstants.h"
#include "core/function/CoreSignalStation.h"
#include "core/function/GlobalSettingStation.h"
+#include "core/model/GpgPassphraseContext.h"
#include "core/module/ModuleManager.h"
#include "ui/UISignalStation.h"
#include "ui/UserInterfaceUtils.h"
diff --git a/src/ui/dialog/GeneralDialog.h b/src/ui/dialog/GeneralDialog.h
index 604c8475..3576319f 100644
--- a/src/ui/dialog/GeneralDialog.h
+++ b/src/ui/dialog/GeneralDialog.h
@@ -61,7 +61,7 @@ class GeneralDialog : public QDialog {
* @brief
*
*/
- [[nodiscard]] bool isRectRestored();
+ [[nodiscard]] auto isRectRestored() -> bool;
/**
* @brief
diff --git a/src/ui/dialog/import_export/KeyImportDetailDialog.cpp b/src/ui/dialog/import_export/KeyImportDetailDialog.cpp
index 5b71c0f6..dfd6c35a 100644
--- a/src/ui/dialog/import_export/KeyImportDetailDialog.cpp
+++ b/src/ui/dialog/import_export/KeyImportDetailDialog.cpp
@@ -159,7 +159,7 @@ void KeyImportDetailDialog::create_keys_table() {
keys_table_->resizeColumnsToContents();
}
-QString KeyImportDetailDialog::get_status_string(int key_status) {
+auto KeyImportDetailDialog::get_status_string(int key_status) -> QString {
QString status_string;
// keystatus is greater than 15, if key is private
if (key_status > 15) {
diff --git a/src/ui/dialog/import_export/KeyImportDetailDialog.h b/src/ui/dialog/import_export/KeyImportDetailDialog.h
index db355570..2af0397d 100644
--- a/src/ui/dialog/import_export/KeyImportDetailDialog.h
+++ b/src/ui/dialog/import_export/KeyImportDetailDialog.h
@@ -80,7 +80,7 @@ class KeyImportDetailDialog : public GeneralDialog {
* @param keyStatus
* @return QString
*/
- static QString get_status_string(int keyStatus);
+ static auto get_status_string(int) -> QString;
QTableWidget* keys_table_{}; ///<
QGroupBox* general_info_box_{}; ///<
diff --git a/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp b/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp
index 6e4a1df0..74f827aa 100644
--- a/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp
+++ b/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp
@@ -432,7 +432,12 @@ void KeyPairOperaTab::slot_import_revoke_cert() {
}
QFile rev_file(rev_file_info.absoluteFilePath());
+
+#ifdef QT5_BUILD
+ if (!rev_file.open(QIODevice::ReadOnly)) {
+#else
if (!rev_file.open(QIODeviceBase::ReadOnly)) {
+#endif
QMessageBox::critical(
this, tr("Error"),
tr("Cannot open this file. Please make sure that this "
diff --git a/src/ui/dialog/settings/SettingsDialog.cpp b/src/ui/dialog/settings/SettingsDialog.cpp
index a26ddf0b..cb17eb0d 100644
--- a/src/ui/dialog/settings/SettingsDialog.cpp
+++ b/src/ui/dialog/settings/SettingsDialog.cpp
@@ -137,7 +137,11 @@ auto SettingsDialog::ListLanguages() -> QHash<QString, QString> {
auto locale = file.mid(start, end - start);
QLocale const q_locale(locale);
+#ifdef QT5_BUILD
+ if (q_locale.nativeCountryName().isEmpty()) continue;
+#else
if (q_locale.nativeTerritoryName().isEmpty()) continue;
+#endif
auto language = q_locale.nativeLanguageName() + " (" + locale + ")";
languages.insert(q_locale.name(), language);
diff --git a/src/ui/function/RaisePinentry.cpp b/src/ui/function/RaisePinentry.cpp
index 216712e8..7c68d67c 100644
--- a/src/ui/function/RaisePinentry.cpp
+++ b/src/ui/function/RaisePinentry.cpp
@@ -64,17 +64,17 @@ auto RaisePinentry::Exec() -> int {
auto* pinentry =
new PinEntryDialog(FindTopMostWindow(this), 0, 15, true, ask_for_new,
- ask_for_new ? tr("Repeat PIN:") : QString(),
+ ask_for_new ? tr("Repeat Passphrase:") : QString(),
tr("Show passphrase"), tr("Hide passphrase"));
if (context_->IsPreWasBad()) {
- pinentry->setError(tr("Given PIN was wrong. Please retry."));
+ pinentry->setError(tr("Given Passphrase was wrong. Please retry."));
}
- pinentry->setPrompt(tr("PIN:"));
+ pinentry->setPrompt(tr("Passphrase:"));
if (!context_->GetUidsInfo().isEmpty()) {
- pinentry->setDescription(QString("Please provide PIN of Key:\n%1\n")
+ pinentry->setDescription(QString("Please provide Passphrase of Key:\n%1\n")
.arg(context_->GetUidsInfo()));
}
diff --git a/src/ui/main_window/GeneralMainWindow.cpp b/src/ui/main_window/GeneralMainWindow.cpp
index e3577199..f58326f9 100644
--- a/src/ui/main_window/GeneralMainWindow.cpp
+++ b/src/ui/main_window/GeneralMainWindow.cpp
@@ -59,9 +59,11 @@ void GpgFrontend::UI::GeneralMainWindow::slot_restore_settings() noexcept {
GF_UI_LOG_DEBUG("restore main window state: {}",
window_state.window_state_data);
- // state sets pos & size of dock-widgets
- this->restoreState(
- QByteArray::fromBase64(window_state.window_state_data.toUtf8()));
+ if (!window_state.window_state_data.isEmpty()) {
+ // state sets pos & size of dock-widgets
+ this->restoreState(
+ QByteArray::fromBase64(window_state.window_state_data.toUtf8()));
+ }
// restore window size & location
if (window_state.window_save) {
@@ -107,6 +109,8 @@ void GpgFrontend::UI::GeneralMainWindow::slot_restore_settings() noexcept {
this->move(pos_);
this->resize(size_);
+ } else {
+ movePosition2CenterOfParent();
}
// appearance
@@ -148,4 +152,82 @@ void GpgFrontend::UI::GeneralMainWindow::slot_save_settings() noexcept {
}
}
+void GeneralMainWindow::setPosCenterOfScreen() {
+ // update cache
+ update_rect_cache();
+
+ int screen_width = screen_rect_.width();
+ int screen_height = screen_rect_.height();
+ GF_UI_LOG_DEBUG("dialog current screen available geometry", screen_width,
+ screen_height);
+
+ // update rect of current dialog
+ rect_ = this->geometry();
+ this->move(screen_rect_.center() -
+ QPoint(rect_.width() / 2, rect_.height() / 2));
+}
+
+void GeneralMainWindow::movePosition2CenterOfParent() {
+ // update cache
+ update_rect_cache();
+
+ // log for debug
+ GF_UI_LOG_DEBUG("parent pos x: {} y: {}", parent_rect_.x(), parent_rect_.y());
+ GF_UI_LOG_DEBUG("parent size width: {}, height: {}", parent_rect_.width(),
+ parent_rect_.height());
+ GF_UI_LOG_DEBUG("parent center pos x: {}, y: {}", parent_rect_.center().x(),
+ parent_rect_.center().y());
+ GF_UI_LOG_DEBUG("dialog pos x: {} y: {}", rect_.x(), rect_.y());
+ GF_UI_LOG_DEBUG("dialog size width: {} height: {}", rect_.width(),
+ rect_.height());
+
+ if (parent_rect_.topLeft() != QPoint{0, 0} &&
+ parent_rect_.size() != QSize{0, 0}) {
+ if (rect_.width() <= 0) rect_.setWidth(100);
+ if (rect_.height() <= 0) rect_.setHeight(100);
+
+ QPoint target_position =
+ parent_rect_.center() - QPoint(rect_.width() / 2, rect_.height() / 2);
+
+ GF_UI_LOG_DEBUG(
+ "update position to parent's center, target pos, x:{}, y: {}",
+ target_position.x(), target_position.y());
+
+ this->move(target_position);
+ } else {
+ setPosCenterOfScreen();
+ }
+}
+
+void GeneralMainWindow::update_rect_cache() {
+ // update size of current dialog
+ rect_ = this->geometry();
+
+ auto *screen = this->window()->screen();
+ screen_rect_ = screen->availableGeometry();
+
+ // read pos and size from parent
+ if (this->parent() != nullptr) {
+ QRect parent_rect;
+
+ auto *parent_widget = qobject_cast<QWidget *>(this->parent());
+ if (parent_widget != nullptr) {
+ parent_rect = parent_widget->geometry();
+ } else {
+ auto *parent_dialog = qobject_cast<QDialog *>(this->parent());
+ if (parent_dialog != nullptr) {
+ parent_rect = parent_dialog->geometry();
+ } else {
+ auto *parent_window = qobject_cast<QMainWindow *>(this->parent());
+ if (parent_window != nullptr) {
+ parent_rect = parent_window->geometry();
+ }
+ }
+ }
+ parent_rect_ = parent_rect;
+ } else {
+ // reset parent's pos and size
+ this->parent_rect_ = QRect{0, 0, 0, 0};
+ }
+}
} // namespace GpgFrontend::UI \ No newline at end of file
diff --git a/src/ui/main_window/GeneralMainWindow.h b/src/ui/main_window/GeneralMainWindow.h
index e1ff31bb..70dad5f3 100644
--- a/src/ui/main_window/GeneralMainWindow.h
+++ b/src/ui/main_window/GeneralMainWindow.h
@@ -55,6 +55,17 @@ class GeneralMainWindow : public QMainWindow {
*/
void closeEvent(QCloseEvent* event) override;
+ /**
+ *
+ */
+ void setPosCenterOfScreen();
+
+ /**
+ * @brief
+ *
+ */
+ void movePosition2CenterOfParent();
+
QSize icon_size_{}; ///<
int font_size_{}; ///<
Qt::ToolButtonStyle icon_style_; ///<
@@ -70,9 +81,18 @@ class GeneralMainWindow : public QMainWindow {
*/
void slot_save_settings() noexcept;
+ /**
+ * @brief
+ *
+ */
+ void update_rect_cache();
+
private:
QString name_; ///<
QPoint pos_; ///<
QSize size_; ///<
+ QRect rect_;
+ QRect screen_rect_;
+ QRect parent_rect_;
};
} // namespace GpgFrontend::UI
diff --git a/src/ui/main_window/MainWindow.cpp b/src/ui/main_window/MainWindow.cpp
index 27634570..a7bd63d8 100644
--- a/src/ui/main_window/MainWindow.cpp
+++ b/src/ui/main_window/MainWindow.cpp
@@ -32,6 +32,7 @@
#include "core/function/CoreSignalStation.h"
#include "core/function/GlobalSettingStation.h"
#include "core/function/gpg/GpgAdvancedOperator.h"
+#include "core/model/GpgPassphraseContext.h"
#include "core/module/ModuleManager.h"
#include "ui/UISignalStation.h"
#include "ui/main_window/GeneralMainWindow.h"
diff --git a/src/ui/widgets/FileTreeView.cpp b/src/ui/widgets/FileTreeView.cpp
index b0241b63..7a725e10 100644
--- a/src/ui/widgets/FileTreeView.cpp
+++ b/src/ui/widgets/FileTreeView.cpp
@@ -67,7 +67,7 @@ void FileTreeView::selectionChanged(const QItemSelection& selected,
GF_UI_LOG_DEBUG("file tree view selected target path: {}", selected_path_);
emit SignalSelectedChanged(selected_path_);
} else {
- selected_path_ = {};
+ selected_path_ = QString();
if (!this->selectedIndexes().isEmpty()) {
selected_path_ = dir_model_->filePath(this->selectedIndexes().front());
emit SignalSelectedChanged(selected_path_);