aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/GpgFrontendUIInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-12-04 12:31:36 +0000
committersaturneric <[email protected]>2023-12-04 12:31:36 +0000
commitde05b25e0b8078d5c9d91b31ad5fc2800ad4b6a5 (patch)
tree3aa6c351835018697d0711503dab4159226cf8af /src/ui/GpgFrontendUIInit.cpp
parentfix: slove logger system isolation issues (diff)
downloadGpgFrontend-de05b25e0b8078d5c9d91b31ad5fc2800ad4b6a5.tar.gz
GpgFrontend-de05b25e0b8078d5c9d91b31ad5fc2800ad4b6a5.zip
fix: common utils should be created before core initialization
Diffstat (limited to 'src/ui/GpgFrontendUIInit.cpp')
-rw-r--r--src/ui/GpgFrontendUIInit.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/GpgFrontendUIInit.cpp b/src/ui/GpgFrontendUIInit.cpp
index 0d2a3331..e8b3663c 100644
--- a/src/ui/GpgFrontendUIInit.cpp
+++ b/src/ui/GpgFrontendUIInit.cpp
@@ -29,6 +29,7 @@
#include "GpgFrontendUIInit.h"
#include <qapplication.h>
+#include <qcoreapplication.h>
#include <spdlog/async.h>
#include <spdlog/common.h>
#include <spdlog/sinks/rotating_file_sink.h>
@@ -43,9 +44,9 @@
#include "core/module/ModuleManager.h"
#include "core/thread/CtxCheckTask.h"
#include "core/thread/TaskRunnerGetter.h"
-#include "spdlog/spdlog.h"
#include "ui/UISignalStation.h"
#include "ui/UserInterfaceUtils.h"
+#include "ui/dialog/gnupg/GnuPGControllerDialog.h"
#include "ui/main_window/MainWindow.h"
#if !defined(RELEASE) && defined(WINDOWS)
@@ -115,6 +116,8 @@ void WaitEnvCheckingProcess() {
looper.exec();
}
+void PreInitGpgFrontendUI() { CommonUtils::GetInstance(); }
+
void InitGpgFrontendUI(QApplication* app) {
// init locale
InitLocale();
@@ -201,7 +204,7 @@ void InitGpgFrontendUI(QApplication* app) {
}
}
-int RunGpgFrontendUI(QApplication* app) {
+auto RunGpgFrontendUI(QApplication* app) -> int {
// create main window and show it
auto main_window = std::make_unique<GpgFrontend::UI::MainWindow>();