Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2022-02-03 12:42:36 +0300
committerHannah von Reth <vonreth@kde.org>2022-02-04 11:56:29 +0300
commit601fc81ba93714ff32b2e5f7699554dbb086cceb (patch)
tree6250af333ce1e1af486c3293b3a87de446782888 /src/gui/main.cpp
parent004f3a2bbebf00d0d32b7e4eec777c50c1b9ecb3 (diff)
Move the creation of the icon to the main thread to prevent crash
We also ensure that qApp is completely set up when we create the icon.
Diffstat (limited to 'src/gui/main.cpp')
-rw-r--r--src/gui/main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index 2224e6d38..9e164763f 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -22,9 +22,10 @@
#endif
#include "application.h"
-#include "theme.h"
-#include "common/utility.h"
#include "cocoainitializer.h"
+#include "common/utility.h"
+#include "guiutility.h"
+#include "theme.h"
#include "updater/updater.h"
@@ -63,8 +64,11 @@ int main(int argc, char **argv)
// though it looks slightly less native. Check here after the
// QApplication was constructed, but before any QWidget is
// constructed.
- if (app.devicePixelRatio() > 1)
+ if (app.devicePixelRatio() > 1) {
QApplication::setStyle(QStringLiteral("fusion"));
+ }
+ // TODO: 2.11 move to platform class
+ Utility::startShutdownWatcher();
#endif // Q_OS_WIN
#ifndef Q_OS_WIN