From f1a2ce4bcb7d46981d1fc471e517709f076d9365 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sun, 8 May 2022 01:01:29 +0800 Subject: refactor: develop 2.0.6 start 1. delete smtp ability 2. change libs link type to dramatic --- src/main.cpp | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) (limited to 'src/main.cpp') 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" @@ -53,18 +54,6 @@ INITIALIZE_EASYLOGGINGPP */ jmp_buf recover_env; -/** - * @brief - * - */ -extern void init_logging(); - -/** - * @brief - * - */ -extern void init_certs(); - /** * @brief * @@ -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. -- cgit v1.2.3 From 9a9f648824cbfc1b9075e1793504e541a700a721 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sun, 8 May 2022 05:25:24 +0800 Subject: fix: solve some issues 1. slove deb packing issues 2. solve ci issues --- src/main.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 5badbf7c..51d977b2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -125,19 +125,6 @@ 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(true, db_path.u8string(), true, - gpg_path.u8string())); -#endif - // create the thread to load the gpg context auto* init_ctx_thread = new GpgFrontend::CtxCheckThread(); QApplication::connect(init_ctx_thread, &QThread::finished, init_ctx_thread, -- cgit v1.2.3