aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main.cpp30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a63d2d02..5badbf7c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -36,8 +36,9 @@
#include "GpgFrontendBuildInfo.h"
#include "core/GpgFunctionObject.h"
+#include "core/thread/CtxCheckThread.h"
+#include "ui/GpgFrontendUIInit.h"
#include "ui/main_window/MainWindow.h"
-#include "ui/thread/CtxCheckThread.h"
#if !defined(RELEASE) && defined(WINDOWS)
#include "core/function/GlobalSettingStation.h"
@@ -57,18 +58,6 @@ jmp_buf recover_env;
* @brief
*
*/
-extern void init_logging();
-
-/**
- * @brief
- *
- */
-extern void init_certs();
-
-/**
- * @brief
- *
- */
extern void init_locale();
/**
@@ -114,12 +103,6 @@ int main(int argc, char* argv[]) {
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
- // initialize logging system
- init_logging();
-
- // init certs for tls connection
- init_certs();
-
// set the extra information of the build
QApplication::setApplicationVersion(BUILD_VERSION);
QApplication::setApplicationName(PROJECT_NAME);
@@ -144,8 +127,8 @@ int main(int argc, char* argv[]) {
#ifdef GPG_STANDALONE_MODE
LOG(INFO) << "GPG_STANDALONE_MODE Enabled";
- auto gpg_path = GpgFrontend::GlobalSettingStation::GetInstance()
- .GetStandaloneGpgBinDir();
+ auto gpg_path =
+ GpgFrontend::GlobalSettingStation::GetInstance().GetStandaloneGpgBinDir();
auto db_path = GpgFrontend::GlobalSettingStation::GetInstance()
.GetStandaloneDatabaseDir();
GpgFrontend::GpgContext::CreateInstance(
@@ -156,7 +139,7 @@ int main(int argc, char* argv[]) {
#endif
// create the thread to load the gpg context
- auto* init_ctx_thread = new GpgFrontend::UI::CtxCheckThread();
+ auto* init_ctx_thread = new GpgFrontend::CtxCheckThread();
QApplication::connect(init_ctx_thread, &QThread::finished, init_ctx_thread,
&QThread::deleteLater);
@@ -195,6 +178,9 @@ int main(int argc, char* argv[]) {
&QEventLoop::quit);
loop.exec();
+ // init ui logging
+ GpgFrontend::UI::init_logging();
+
/**
* internationalisation. loop to restart main window
* with changed translation when settings change.