Move QGuiApplication::setQuitOnLastWindowClosed before QApplication

This commit is contained in:
Jonas Kvinge 2022-05-21 19:09:09 +02:00
parent aebdc89f77
commit f231f28818
1 changed files with 3 additions and 1 deletions

View File

@ -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))