diff options
author | saturneric <[email protected]> | 2023-12-01 12:38:52 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-01 12:38:52 +0000 |
commit | 9ea9c03263ad14c09d02cc3a9d25c9e890581046 (patch) | |
tree | fe9a01786f4b9c3973fafbcf5d3d679cd36b44f0 /src/ui/UserInterfaceUtils.cpp | |
parent | fix: update exit oprations odering (diff) | |
download | GpgFrontend-9ea9c03263ad14c09d02cc3a9d25c9e890581046.tar.gz GpgFrontend-9ea9c03263ad14c09d02cc3a9d25c9e890581046.zip |
fix: discover and fix some bugs
Diffstat (limited to 'src/ui/UserInterfaceUtils.cpp')
-rw-r--r-- | src/ui/UserInterfaceUtils.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/ui/UserInterfaceUtils.cpp b/src/ui/UserInterfaceUtils.cpp index eb6b6d58..0f44f3ab 100644 --- a/src/ui/UserInterfaceUtils.cpp +++ b/src/ui/UserInterfaceUtils.cpp @@ -36,13 +36,14 @@ #include "core/GpgConstants.h" #include "core/function/CacheManager.h" #include "core/function/CoreSignalStation.h" -#include "core/function/GlobalSettingStation.h" #include "core/function/gpg/GpgKeyGetter.h" #include "core/module/ModuleManager.h" #include "core/thread/Task.h" #include "core/thread/TaskRunner.h" #include "core/thread/TaskRunnerGetter.h" +#include "core/utils/CacheUtils.h" #include "core/utils/IOUtils.h" +#include "spdlog/spdlog.h" #include "ui/SignalStation.h" #include "ui/dialog/WaitingDialog.h" #include "ui/dialog/gnupg/GnuPGControllerDialog.h" @@ -436,7 +437,7 @@ void CommonUtils::SlotImportKeyFromKeyServer( } void CommonUtils::slot_update_key_status() { - auto refresh_task = new Thread::Task( + auto *refresh_task = new Thread::Task( [](DataObjectPtr) -> int { // flush key cache for all GpgKeyGetter Intances. for (const auto &channel_id : GpgKeyGetter::GetAllChannelId()) { @@ -446,8 +447,7 @@ void CommonUtils::slot_update_key_status() { }, "update_key_database_task"); connect(refresh_task, &Thread::Task::SignalTaskEnd, this, - &CommonUtils::SignalKeyDatabaseRefreshDone, - Qt::BlockingQueuedConnection); + &CommonUtils::SignalKeyDatabaseRefreshDone); // post the task to the default task runner Thread::TaskRunnerGetter::GetInstance().GetTaskRunner()->PostTask( @@ -464,11 +464,10 @@ void CommonUtils::slot_popup_passphrase_input_dialog() { dialog->resize(500, 80); dialog->exec(); - QString password = dialog->textValue(); - dialog->deleteLater(); + SetTempCacheValue("__key_passphrase", dialog->textValue().toStdString()); // send signal - emit SignalUserInputPassphraseDone(password); + emit SignalUserInputPassphraseDone(); } void CommonUtils::SlotRestartApplication(int code) { |