aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/UserInterfaceUtils.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-01 00:21:46 +0000
committersaturneric <[email protected]>2024-12-01 00:21:46 +0000
commiteeec34f66fac8ecb350cd8d683a5dd167c91e706 (patch)
tree61da717af5370e37963da1e21f9daae0dc426b00 /src/ui/UserInterfaceUtils.cpp
parentfix: solve link errors on windows (diff)
parentfeat: improve windows release structure at nightly build (diff)
downloadGpgFrontend-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.cpp14
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_;
}