Changeset View
Changeset View
Standalone View
Standalone View
src/main.cpp
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | 67 | { | |||
---|---|---|---|---|---|
70 | // QApplication takes/removes the Qt specific arguments that are incompatible. | 70 | // QApplication takes/removes the Qt specific arguments that are incompatible. | ||
71 | KDBusService::StartupOption startupOption = KDBusService::Unique; | 71 | KDBusService::StartupOption startupOption = KDBusService::Unique; | ||
72 | if (shouldUseNewProcess(argc, argv)) { | 72 | if (shouldUseNewProcess(argc, argv)) { | ||
73 | startupOption = KDBusService::Multiple; | 73 | startupOption = KDBusService::Multiple; | ||
74 | } else { | 74 | } else { | ||
75 | needToDeleteQApplication = true; | 75 | needToDeleteQApplication = true; | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | #if defined(Q_OS_LINUX) | 78 | #if defined(Q_OS_LINUX) && (QT_VERSION < QT_VERSION_CHECK(5,11,2)) | ||
79 | // Workaround for https://bugreports.qt.io/browse/QTBUG-48344 | 79 | // Workaround for https://bugreports.qt.io/browse/QTBUG-48344 | ||
80 | // See also https://bugs.kde.org/show_bug.cgi?id=230184 | 80 | // See also https://bugs.kde.org/show_bug.cgi?id=230184 | ||
81 | // The Qt glib event loop doesn't let timers deliver events if there are a | 81 | // The Qt glib event loop doesn't let timers deliver events if there are a | ||
82 | // lot of other events. | 82 | // lot of other events. | ||
83 | const QByteArray qtUseGLibOld = qgetenv("QT_NO_GLIB"); | 83 | const QByteArray qtUseGLibOld = qgetenv("QT_NO_GLIB"); | ||
84 | qputenv("QT_NO_GLIB", "1"); | 84 | qputenv("QT_NO_GLIB", "1"); | ||
85 | #endif | 85 | #endif | ||
86 | 86 | | |||
87 | auto app = new QApplication(argc, argv); | 87 | auto app = new QApplication(argc, argv); | ||
88 | 88 | | |||
89 | #if defined(Q_OS_LINUX) | 89 | #if defined(Q_OS_LINUX) && (QT_VERSION < QT_VERSION_CHECK(5,11,2)) | ||
90 | if (qtUseGLibOld.isNull()) { | 90 | if (qtUseGLibOld.isNull()) { | ||
91 | qunsetenv("QT_NO_GLIB"); | 91 | qunsetenv("QT_NO_GLIB"); | ||
92 | } else { | 92 | } else { | ||
93 | qputenv("QT_NO_GLIB", qtUseGLibOld); | 93 | qputenv("QT_NO_GLIB", qtUseGLibOld); | ||
94 | } | 94 | } | ||
95 | #endif | 95 | #endif | ||
96 | 96 | | |||
97 | // enable high dpi support | 97 | // enable high dpi support | ||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |