Changeset View
Changeset View
Standalone View
Standalone View
shell/main.cpp
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | 53 | if (!qEnvironmentVariableIsSet("PLASMA_USE_QT_SCALING")) { | |||
---|---|---|---|---|---|
54 | qunsetenv("QT_DEVICE_PIXEL_RATIO"); | 54 | qunsetenv("QT_DEVICE_PIXEL_RATIO"); | ||
55 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | 55 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | ||
56 | } else { | 56 | } else { | ||
57 | QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); | 57 | QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); | ||
58 | } | 58 | } | ||
59 | 59 | | |||
60 | QQuickWindow::setDefaultAlphaBuffer(true); | 60 | QQuickWindow::setDefaultAlphaBuffer(true); | ||
61 | 61 | | |||
62 | const bool qpaVariable = qEnvironmentVariableIsSet("QT_QPA_PLATFORM"); | ||||
62 | KWorkSpace::detectPlatform(argc, argv); | 63 | KWorkSpace::detectPlatform(argc, argv); | ||
63 | QApplication app(argc, argv); | 64 | QApplication app(argc, argv); | ||
65 | if (!qpaVariable) { | ||||
66 | // don't leak the env variable to processes we start | ||||
67 | qunsetenv("QT_QPA_PLATFORM"); | ||||
68 | } | ||||
64 | KLocalizedString::setApplicationDomain("plasmashell"); | 69 | KLocalizedString::setApplicationDomain("plasmashell"); | ||
65 | 70 | | |||
66 | // The executable's path is added to the library/plugin paths. | 71 | // The executable's path is added to the library/plugin paths. | ||
67 | // This does not make much sense for plasmashell. | 72 | // This does not make much sense for plasmashell. | ||
68 | app.removeLibraryPath(QCoreApplication::applicationDirPath()); | 73 | app.removeLibraryPath(QCoreApplication::applicationDirPath()); | ||
69 | 74 | | |||
70 | KQuickAddons::QtQuickSettings::init(); | 75 | KQuickAddons::QtQuickSettings::init(); | ||
71 | 76 | | |||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |