aboutsummaryrefslogtreecommitdiffstats
path: root/src/GpgFrontendContext.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-12 15:08:38 +0000
committersaturneric <[email protected]>2024-01-12 15:08:38 +0000
commit6983b5c1dd82d159236ebd06cf17f071cc9c1ee9 (patch)
treefc53f790e33546320b2ecd306a1a9ade6fbdfe7a /src/GpgFrontendContext.cpp
parentfix: slove a heap-use-after-free issue (diff)
downloadGpgFrontend-6983b5c1dd82d159236ebd06cf17f071cc9c1ee9.tar.gz
GpgFrontend-6983b5c1dd82d159236ebd06cf17f071cc9c1ee9.zip
refactor: remove boost and use QString instead of std::filesystem::path
Diffstat (limited to 'src/GpgFrontendContext.cpp')
-rw-r--r--src/GpgFrontendContext.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/GpgFrontendContext.cpp b/src/GpgFrontendContext.cpp
index 461bbeaa..9d264dcd 100644
--- a/src/GpgFrontendContext.cpp
+++ b/src/GpgFrontendContext.cpp
@@ -34,24 +34,14 @@
#include <qthread.h>
#include "core/utils/MemoryUtils.h"
-#include "ui/GpgFrontendApplication.h"
namespace GpgFrontend {
-void GpgFrontendContext::InitApplication(bool gui_mode) {
- if (!gui_mode) {
- app_ = SecureCreateObject<QCoreApplication>(argc, argv);
- } else {
- app_ = SecureCreateObject<QApplication>(argc, argv);
- }
- this->load_ui_env = gui_mode;
+void GpgFrontendContext::InitApplication() {
+ app_ = SecureCreateObject<QApplication>(argc, argv);
}
-auto GpgFrontendContext::GetApp() -> QCoreApplication* { return app_; }
-
-auto GpgFrontendContext::GetGuiApp() -> QApplication* {
- return qobject_cast<QApplication*>(app_);
-}
+auto GpgFrontendContext::GetApp() -> QApplication* { return app_; }
GpgFrontendContext::GpgFrontendContext(int argc, char** argv)
: argc(argc), argv(argv) {}