Changeset View
Changeset View
Standalone View
Standalone View
app/main.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | |||||
44 | #include <QCommandLineOption> | 44 | #include <QCommandLineOption> | ||
45 | #include <QFileInfo> | 45 | #include <QFileInfo> | ||
46 | #include <QProcessEnvironment> | 46 | #include <QProcessEnvironment> | ||
47 | #include <QSessionManager> | 47 | #include <QSessionManager> | ||
48 | #include <QTextStream> | 48 | #include <QTextStream> | ||
49 | #include <QDBusInterface> | 49 | #include <QDBusInterface> | ||
50 | #include <QDBusReply> | 50 | #include <QDBusReply> | ||
51 | 51 | | |||
52 | #include <QQuickWindow> | ||||
53 | | ||||
52 | #include <shell/core.h> | 54 | #include <shell/core.h> | ||
53 | #include <shell/mainwindow.h> | 55 | #include <shell/mainwindow.h> | ||
54 | #include <shell/projectcontroller.h> | 56 | #include <shell/projectcontroller.h> | ||
55 | #include <shell/documentcontroller.h> | 57 | #include <shell/documentcontroller.h> | ||
56 | #include <shell/plugincontroller.h> | 58 | #include <shell/plugincontroller.h> | ||
57 | #include <shell/sessioncontroller.h> | 59 | #include <shell/sessioncontroller.h> | ||
58 | #include <shell/runcontroller.h> | 60 | #include <shell/runcontroller.h> | ||
59 | #include <shell/launchconfiguration.h> | 61 | #include <shell/launchconfiguration.h> | ||
▲ Show 20 Lines • Show All 239 Lines • ▼ Show 20 Line(s) | 299 | { | |||
299 | return sessionInfo.holderPid; | 301 | return sessionInfo.holderPid; | ||
300 | } | 302 | } | ||
301 | 303 | | |||
302 | int main( int argc, char *argv[] ) | 304 | int main( int argc, char *argv[] ) | ||
303 | { | 305 | { | ||
304 | QElapsedTimer timer; | 306 | QElapsedTimer timer; | ||
305 | timer.start(); | 307 | timer.start(); | ||
306 | 308 | | |||
309 | #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) | ||||
310 | // If possible, use the Software backend for QQuickWidget (currently used in the | ||||
kfunk: Please add a comment explaining why we're doing this, and probably point to bug 386527. | |||||
311 | // welcome page plugin). This means we don't need OpenGL at all, avoiding issues | ||||
312 | // like https://bugs.kde.org/show_bug.cgi?id=386527. | ||||
313 | QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); | ||||
314 | #endif | ||||
315 | | ||||
307 | // TODO: Maybe generalize, add KDEVELOP_STANDALONE build option | 316 | // TODO: Maybe generalize, add KDEVELOP_STANDALONE build option | ||
308 | #if defined(Q_OS_WIN) || defined(Q_OS_MAC) | 317 | #if defined(Q_OS_WIN) || defined(Q_OS_MAC) | ||
309 | qputenv("KDE_FORK_SLAVES", "1"); // KIO slaves will be forked off instead of being started via DBus | 318 | qputenv("KDE_FORK_SLAVES", "1"); // KIO slaves will be forked off instead of being started via DBus | ||
310 | #endif | 319 | #endif | ||
311 | 320 | | |||
312 | // Useful for valgrind runs, just `export KDEV_DISABLE_JIT=1` | 321 | // Useful for valgrind runs, just `export KDEV_DISABLE_JIT=1` | ||
313 | if (qEnvironmentVariableIsSet("KDEV_DISABLE_JIT")) { | 322 | if (qEnvironmentVariableIsSet("KDEV_DISABLE_JIT")) { | ||
314 | qputenv("KDEV_DISABLE_WELCOMEPAGE", "1"); | 323 | qputenv("KDEV_DISABLE_WELCOMEPAGE", "1"); | ||
▲ Show 20 Lines • Show All 471 Lines • Show Last 20 Lines |
Please add a comment explaining why we're doing this, and probably point to bug 386527.