diff options
author | saturneric <[email protected]> | 2024-11-27 20:23:51 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-11-27 20:23:51 +0000 |
commit | a83c6e28a16f998d89b956688f07ce5352a2864f (patch) | |
tree | 796ad69eee3add96df38e3e4f1dc78a82745a9db /src/ui/UserInterfaceUtils.cpp | |
parent | fix: solve devops build issues (diff) | |
download | GpgFrontend-a83c6e28a16f998d89b956688f07ce5352a2864f.tar.gz GpgFrontend-a83c6e28a16f998d89b956688f07ce5352a2864f.zip |
feat: improve ui logic and support more email operations
Diffstat (limited to '')
-rw-r--r-- | src/ui/UserInterfaceUtils.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/UserInterfaceUtils.cpp b/src/ui/UserInterfaceUtils.cpp index b8fc9961..d8c0059b 100644 --- a/src/ui/UserInterfaceUtils.cpp +++ b/src/ui/UserInterfaceUtils.cpp @@ -55,8 +55,8 @@ namespace GpgFrontend::UI { -std::unique_ptr<GpgFrontend::UI::CommonUtils> - GpgFrontend::UI::CommonUtils::instance_ = nullptr; +QScopedPointer<CommonUtils> CommonUtils::instance = + QScopedPointer<CommonUtils>(nullptr); void show_verify_details(QWidget *parent, int channel, InfoBoardWidget *info_board, GpgError error, @@ -121,10 +121,10 @@ void process_operation(QWidget *parent, const QString &waiting_title, } auto CommonUtils::GetInstance() -> CommonUtils * { - if (instance_ == nullptr) { - instance_ = std::make_unique<CommonUtils>(); + if (!instance) { + instance.reset(new CommonUtils()); } - return instance_.get(); + return instance.get(); } CommonUtils::CommonUtils() : QWidget(nullptr) { @@ -373,7 +373,7 @@ void CommonUtils::SlotExecuteGpgCommand( void CommonUtils::SlotImportKeyFromKeyServer( int channel, const KeyIdArgsList &key_ids, - const ImportCallbackFunctiopn &callback) { + const ImportCallbackFunction &callback) { auto target_keyserver = KeyServerSO(SettingsObject("key_server")).GetTargetServer(); if (target_keyserver.isEmpty()) { @@ -554,7 +554,7 @@ void CommonUtils::SlotRestartApplication(int code) { } } -auto CommonUtils::isApplicationNeedRestart() -> bool { +auto CommonUtils::IsApplicationNeedRestart() -> bool { return application_need_to_restart_at_once_; } |