From f231f28818e2ded1ca45a8e7f445bd48c336dfaf Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 21 May 2022 19:09:09 +0200 Subject: [PATCH] Move QGuiApplication::setQuitOnLastWindowClosed before QApplication --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 6a01f3853..057d291bc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -180,6 +180,8 @@ int main(int argc, char *argv[]) { Utilities::IncreaseFDLimit(); + QGuiApplication::setQuitOnLastWindowClosed(false); + // important: Do not remove this. // This must also be done as a SingleApplication, in case SingleCoreApplication was compiled with a different appdata. SingleApplication a(argc, argv, true, SingleApplication::Mode::User | SingleApplication::Mode::ExcludeAppVersion | SingleApplication::Mode::ExcludeAppPath); @@ -192,7 +194,7 @@ int main(int argc, char *argv[]) { } return 0; } - QGuiApplication::setQuitOnLastWindowClosed(false); + QGuiApplication::setWindowIcon(IconLoader::Load("strawberry")); #if defined(USE_BUNDLE) && (defined(Q_OS_LINUX) || defined(Q_OS_MACOS))