aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-15 17:19:34 +0000
committersaturneric <[email protected]>2024-01-15 17:19:34 +0000
commit34b51c5e0915cbb11c80029aaa05d96c7115fac3 (patch)
treeabb530d5d93ab09ff95844b000958b79c07cd3c5 /src/ui/main_window
parentfix: reload ui should not destroy core and module system (diff)
downloadGpgFrontend-34b51c5e0915cbb11c80029aaa05d96c7115fac3.tar.gz
GpgFrontend-34b51c5e0915cbb11c80029aaa05d96c7115fac3.zip
fix: slove the languange settings issue
Diffstat (limited to 'src/ui/main_window')
-rw-r--r--src/ui/main_window/MainWindow.cpp6
-rw-r--r--src/ui/main_window/MainWindowFileSlotFunction.cpp10
2 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/main_window/MainWindow.cpp b/src/ui/main_window/MainWindow.cpp
index 0ae6d409..cdeb597a 100644
--- a/src/ui/main_window/MainWindow.cpp
+++ b/src/ui/main_window/MainWindow.cpp
@@ -129,7 +129,7 @@ void MainWindow::Init() noexcept {
if (GlobalSettingStation::GetInstance()
.GetSettings()
- .value("general/clear_gpg_password_cache", false)
+ .value("basic/clear_gpg_password_cache", false)
.toBool()) {
if (GpgFrontend::GpgAdvancedOperator::ClearGpgPasswordCache()) {
GF_UI_LOG_DEBUG("clear gpg password cache done");
@@ -178,8 +178,8 @@ void MainWindow::restore_settings() {
if (key_server.default_server < 0) key_server.default_server = 0;
auto settings = GlobalSettingStation::GetInstance().GetSettings();
- if (!settings.contains("general/non_ascii_when_export")) {
- settings.setValue("general/non_ascii_when_export", true);
+ if (!settings.contains("basic/non_ascii_when_export")) {
+ settings.setValue("basic/non_ascii_when_export", true);
}
// set appearance
diff --git a/src/ui/main_window/MainWindowFileSlotFunction.cpp b/src/ui/main_window/MainWindowFileSlotFunction.cpp
index c4cce04f..80390b13 100644
--- a/src/ui/main_window/MainWindowFileSlotFunction.cpp
+++ b/src/ui/main_window/MainWindowFileSlotFunction.cpp
@@ -53,7 +53,7 @@ void MainWindow::SlotFileEncrypt(const QString& path) {
bool const non_ascii_when_export =
GlobalSettingStation::GetInstance()
.GetSettings()
- .value("general/non_ascii_when_export", true)
+ .value("basic/non_ascii_when_export", true)
.toBool();
auto out_path =
SetExtensionOfOutputFile(path, kENCRYPT, !non_ascii_when_export);
@@ -161,7 +161,7 @@ void MainWindow::SlotDirectoryEncrypt(const QString& path) {
bool const non_ascii_when_export =
GlobalSettingStation::GetInstance()
.GetSettings()
- .value("general/non_ascii_when_export", true)
+ .value("basic/non_ascii_when_export", true)
.toBool();
auto out_path = SetExtensionOfOutputFileForArchive(path, kENCRYPT,
!non_ascii_when_export);
@@ -385,7 +385,7 @@ void MainWindow::SlotFileSign(const QString& path) {
bool const non_ascii_when_export =
GlobalSettingStation::GetInstance()
.GetSettings()
- .value("general/non_ascii_when_export", true)
+ .value("basic/non_ascii_when_export", true)
.toBool();
auto sig_file_path =
SetExtensionOfOutputFile(path, kSIGN, !non_ascii_when_export);
@@ -536,7 +536,7 @@ void MainWindow::SlotFileEncryptSign(const QString& path) {
bool const non_ascii_when_export =
GlobalSettingStation::GetInstance()
.GetSettings()
- .value("general/non_ascii_when_export", true)
+ .value("basic/non_ascii_when_export", true)
.toBool();
auto out_path =
SetExtensionOfOutputFile(path, kENCRYPT_SIGN, !non_ascii_when_export);
@@ -637,7 +637,7 @@ void MainWindow::SlotDirectoryEncryptSign(const QString& path) {
bool const non_ascii_when_export =
GlobalSettingStation::GetInstance()
.GetSettings()
- .value("general/non_ascii_when_export", true)
+ .value("basic/non_ascii_when_export", true)
.toBool();
auto out_path = SetExtensionOfOutputFileForArchive(path, kENCRYPT_SIGN,
!non_ascii_when_export);