Changeset View
Changeset View
Standalone View
Standalone View
src/platformtheme/kdeplatformtheme.cpp
Context not available. | |||||
395 | //force QtQuickControls2 to use the desktop theme as default | 395 | //force QtQuickControls2 to use the desktop theme as default | ||
---|---|---|---|---|---|
396 | void KdePlatformTheme::setQtQuickControlsTheme() | 396 | void KdePlatformTheme::setQtQuickControlsTheme() | ||
397 | { | 397 | { | ||
398 | //if the user is running only a QGuiApplication, explicitely unset the QQC1 desktop style and abort | 398 | //if the user is running only a QGuiApplication, abort as this style is all about QWidgets and we know setting this will make it crash | ||
399 | //as this style is all about QWidgets and we know setting this will make it crash | | |||
400 | if (!qobject_cast<QApplication*>(qApp)) { | 399 | if (!qobject_cast<QApplication*>(qApp)) { | ||
401 | if (qgetenv("QT_QUICK_CONTROLS_1_STYLE").right(7) == "Desktop") { | | |||
402 | qunsetenv("QT_QUICK_CONTROLS_1_STYLE"); | | |||
403 | } | | |||
404 | return; | 400 | return; | ||
405 | } | 401 | } | ||
406 | //if the user has explicitly set something else, don't meddle | 402 | //if the user has explicitly set something else, don't meddle | ||
Context not available. |