diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2020-09-29 16:52:07 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2020-09-29 14:00:56 +0000 |
commit | a3e92da8b842526e6df384f276eabd911d3d7ab4 (patch) | |
tree | 390b2c8c0176e1dc022c3716c143c856f5b31130 /share/qtcreator | |
parent | b099c2967b43e7677815f69e754cc981a3bd9e5f (diff) |
QmlPuppet: Force QApplication use in puppet if charts is imported
Qt Charts requires QApplication, so force that on when QtCharts import
is detected.
Change-Id: Ie725cb0714f2816a34374e46de71b82f00ce6239
Fixes: QDS-2842
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'share/qtcreator')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp index ee2f5bac59..98df3de295 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp @@ -149,7 +149,9 @@ int main(int argc, char *argv[]) #endif //If a style different from Desktop is set we have to use QGuiApplication - bool useGuiApplication = qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_STYLE") + bool useGuiApplication = (!qEnvironmentVariableIsSet("QMLDESIGNER_FORCE_QAPPLICATION") + || qgetenv("QMLDESIGNER_FORCE_QAPPLICATION") != "true") + && qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_STYLE") && qgetenv("QT_QUICK_CONTROLS_STYLE") != "Desktop"; if (useGuiApplication) { |