Changeset View
Changeset View
Standalone View
Standalone View
krunner/main.cpp
Show All 38 Lines | |||||
39 | 39 | | |||
40 | static QCommandLineParser parser; | 40 | static QCommandLineParser parser; | ||
41 | 41 | | |||
42 | int main(int argc, char **argv) | 42 | int main(int argc, char **argv) | ||
43 | { | 43 | { | ||
44 | qunsetenv("QT_DEVICE_PIXEL_RATIO"); | 44 | qunsetenv("QT_DEVICE_PIXEL_RATIO"); | ||
45 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | 45 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | ||
46 | 46 | | |||
47 | const bool qpaVariable = qEnvironmentVariableIsSet("QT_QPA_PLATFORM"); | ||||
47 | KWorkSpace::detectPlatform(argc, argv); | 48 | KWorkSpace::detectPlatform(argc, argv); | ||
48 | QQuickWindow::setDefaultAlphaBuffer(true); | 49 | QQuickWindow::setDefaultAlphaBuffer(true); | ||
49 | QApplication app(argc, argv); | 50 | QApplication app(argc, argv); | ||
51 | if (!qpaVariable) { | ||||
52 | // don't leak the env variable to processes we start | ||||
53 | qunsetenv("QT_QPA_PLATFORM"); | ||||
54 | } | ||||
50 | KLocalizedString::setApplicationDomain("krunner"); | 55 | KLocalizedString::setApplicationDomain("krunner"); | ||
51 | 56 | | |||
52 | KQuickAddons::QtQuickSettings::init(); | 57 | KQuickAddons::QtQuickSettings::init(); | ||
53 | 58 | | |||
54 | // TODO: Make it a QGuiApplication once we don't depend on KDELibs4Support | 59 | // TODO: Make it a QGuiApplication once we don't depend on KDELibs4Support | ||
55 | // QGuiApplication app(argc, argv); | 60 | // QGuiApplication app(argc, argv); | ||
56 | 61 | | |||
57 | KAboutData aboutData(QStringLiteral("krunner"), | 62 | KAboutData aboutData(QStringLiteral("krunner"), | ||
Show All 36 Lines |