diff options
author | saturneric <[email protected]> | 2024-12-01 00:21:46 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-12-01 00:21:46 +0000 |
commit | eeec34f66fac8ecb350cd8d683a5dd167c91e706 (patch) | |
tree | 61da717af5370e37963da1e21f9daae0dc426b00 /src/ui/UserInterfaceUtils.cpp | |
parent | fix: solve link errors on windows (diff) | |
parent | feat: improve windows release structure at nightly build (diff) | |
download | GpgFrontend-eeec34f66fac8ecb350cd8d683a5dd167c91e706.tar.gz GpgFrontend-eeec34f66fac8ecb350cd8d683a5dd167c91e706.zip |
Merge branch 'dev/2.1.5/mingw' into develop
Diffstat (limited to 'src/ui/UserInterfaceUtils.cpp')
-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_; } |