diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 39 |
1 files changed, 6 insertions, 33 deletions
diff --git a/src/main.cpp b/src/main.cpp index a63d2d02..51d977b2 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); @@ -142,21 +125,8 @@ int main(int argc, char* argv[]) { file.close(); #endif -#ifdef GPG_STANDALONE_MODE - LOG(INFO) << "GPG_STANDALONE_MODE Enabled"; - auto gpg_path = GpgFrontend::GlobalSettingStation::GetInstance() - .GetStandaloneGpgBinDir(); - auto db_path = GpgFrontend::GlobalSettingStation::GetInstance() - .GetStandaloneDatabaseDir(); - GpgFrontend::GpgContext::CreateInstance( - GpgFrontend::SingletonFunctionObject< - GpgFrontend::GpgContext>::GetDefaultChannel(), - std::make_unique<GpgFrontend::GpgContext>(true, db_path.u8string(), true, - gpg_path.u8string())); -#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 +165,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. |