Changeset View
Changeset View
Standalone View
Standalone View
src/main.cpp
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 74 | } else { | |||
---|---|---|---|---|---|
75 | needToDeleteQApplication = true; | 75 | needToDeleteQApplication = true; | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | #if defined(Q_OS_LINUX) | 78 | #if defined(Q_OS_LINUX) | ||
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 | qputenv("QT_NO_GLIB", "1"); | 84 | qputenv("QT_NO_GLIB", "1"); | ||
84 | #endif | 85 | #endif | ||
85 | 86 | | |||
86 | auto app = new QApplication(argc, argv); | 87 | auto app = new QApplication(argc, argv); | ||
87 | 88 | | |||
89 | #if defined(Q_OS_LINUX) | ||||
90 | if (qtUseGLibOld.isNull()) { | ||||
91 | qunsetenv("QT_NO_GLIB"); | ||||
92 | } else { | ||||
93 | qputenv("QT_NO_GLIB", qtUseGLibOld); | ||||
94 | } | ||||
95 | #endif | ||||
96 | | ||||
88 | // enable high dpi support | 97 | // enable high dpi support | ||
89 | app->setAttribute(Qt::AA_UseHighDpiPixmaps, true); | 98 | app->setAttribute(Qt::AA_UseHighDpiPixmaps, true); | ||
90 | 99 | | |||
91 | #if defined(Q_OS_MACOS) | 100 | #if defined(Q_OS_MACOS) | ||
92 | // this ensures that Ctrl and Meta are not swapped, so CTRL-C and friends | 101 | // this ensures that Ctrl and Meta are not swapped, so CTRL-C and friends | ||
93 | // will work correctly in the terminal | 102 | // will work correctly in the terminal | ||
94 | app->setAttribute(Qt::AA_MacDontSwapCtrlAndMeta); | 103 | app->setAttribute(Qt::AA_MacDontSwapCtrlAndMeta); | ||
95 | 104 | | |||
▲ Show 20 Lines • Show All 269 Lines • Show Last 20 Lines |