aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/GpgFrontendUIInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-18 00:06:40 +0000
committersaturneric <[email protected]>2025-04-18 00:06:40 +0000
commit0261c780976d8ac650006916dcc2688582f4922e (patch)
tree6839e6738ec4c5d2447b3e60f7a974752050898e /src/ui/GpgFrontendUIInit.cpp
parentfix: add missing libGLESv2.dll on windows platform (diff)
downloadGpgFrontend-0261c780976d8ac650006916dcc2688582f4922e.tar.gz
GpgFrontend-0261c780976d8ac650006916dcc2688582f4922e.zip
fix: issues found by testing
Diffstat (limited to 'src/ui/GpgFrontendUIInit.cpp')
-rw-r--r--src/ui/GpgFrontendUIInit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/GpgFrontendUIInit.cpp b/src/ui/GpgFrontendUIInit.cpp
index 1ee59d12..55d934bd 100644
--- a/src/ui/GpgFrontendUIInit.cpp
+++ b/src/ui/GpgFrontendUIInit.cpp
@@ -217,7 +217,8 @@ void WaitingAllInitializationFinished() {
auto RunGpgFrontendUI(QApplication* app) -> int {
// create main window and show it
- auto* main_window = new GpgFrontend::UI::MainWindow();
+ auto main_window = QSharedPointer<GpgFrontend::UI::MainWindow>::create();
+ main_window->setAttribute(Qt::WA_DeleteOnClose, false);
// pre-check, if application need to restart
if (CommonUtils::GetInstance()->IsApplicationNeedRestart()) {
@@ -233,7 +234,6 @@ auto RunGpgFrontendUI(QApplication* app) -> int {
// show main windows
main_window->show();
- // start the main event loop
return QApplication::exec();
}