diff options
author | saturneric <[email protected]> | 2024-01-15 17:02:40 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-15 17:02:40 +0000 |
commit | d54f52ce70cba15f5199e93d3c6fb122143b0526 (patch) | |
tree | f75224f8d020c4c7498bd1ffb97c834e12ec8a2c /src/ui/main_window/MainWindowFileSlotFunction.cpp | |
parent | fix: clean up useless code and make life easier (diff) | |
download | GpgFrontend-d54f52ce70cba15f5199e93d3c6fb122143b0526.tar.gz GpgFrontend-d54f52ce70cba15f5199e93d3c6fb122143b0526.zip |
refactor: remove libconfig++ form project
Diffstat (limited to 'src/ui/main_window/MainWindowFileSlotFunction.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowFileSlotFunction.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/ui/main_window/MainWindowFileSlotFunction.cpp b/src/ui/main_window/MainWindowFileSlotFunction.cpp index fee4d493..c4cce04f 100644 --- a/src/ui/main_window/MainWindowFileSlotFunction.cpp +++ b/src/ui/main_window/MainWindowFileSlotFunction.cpp @@ -51,8 +51,10 @@ void MainWindow::SlotFileEncrypt(const QString& path) { } bool const non_ascii_when_export = - GlobalSettingStation::GetInstance().LookupSettings( - "general.non_ascii_when_export", true); + GlobalSettingStation::GetInstance() + .GetSettings() + .value("general/non_ascii_when_export", true) + .toBool(); auto out_path = SetExtensionOfOutputFile(path, kENCRYPT, !non_ascii_when_export); @@ -157,8 +159,10 @@ void MainWindow::SlotDirectoryEncrypt(const QString& path) { } bool const non_ascii_when_export = - GlobalSettingStation::GetInstance().LookupSettings( - "general.non_ascii_when_export", true); + GlobalSettingStation::GetInstance() + .GetSettings() + .value("general/non_ascii_when_export", true) + .toBool(); auto out_path = SetExtensionOfOutputFileForArchive(path, kENCRYPT, !non_ascii_when_export); @@ -379,8 +383,10 @@ void MainWindow::SlotFileSign(const QString& path) { } bool const non_ascii_when_export = - GlobalSettingStation::GetInstance().LookupSettings( - "general.non_ascii_when_export", true); + GlobalSettingStation::GetInstance() + .GetSettings() + .value("general/non_ascii_when_export", true) + .toBool(); auto sig_file_path = SetExtensionOfOutputFile(path, kSIGN, !non_ascii_when_export); @@ -528,8 +534,10 @@ void MainWindow::SlotFileEncryptSign(const QString& path) { } bool const non_ascii_when_export = - GlobalSettingStation::GetInstance().LookupSettings( - "general.non_ascii_when_export", true); + GlobalSettingStation::GetInstance() + .GetSettings() + .value("general/non_ascii_when_export", true) + .toBool(); auto out_path = SetExtensionOfOutputFile(path, kENCRYPT_SIGN, !non_ascii_when_export); @@ -627,8 +635,10 @@ void MainWindow::SlotDirectoryEncryptSign(const QString& path) { } bool const non_ascii_when_export = - GlobalSettingStation::GetInstance().LookupSettings( - "general.non_ascii_when_export", true); + GlobalSettingStation::GetInstance() + .GetSettings() + .value("general/non_ascii_when_export", true) + .toBool(); auto out_path = SetExtensionOfOutputFileForArchive(path, kENCRYPT_SIGN, !non_ascii_when_export); |