summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2019-04-08 09:29:34 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2019-04-08 09:12:26 +0000
commit5ead393eba0fc9d7c05790887c53c3728b023195 (patch)
tree5d7d29dc310309e8df498642f02c53ecf7d8a168
parentfbce9202122d227f138a85f3d9b4f39bd8548143 (diff)
Fix qmlscene command parsingv5.12.35.12.3
If "QMLSCENE_CORE_PROFILE" is set the command line parsing does not work anymore. Change-Id: I75ffa733562708a412d1ae341b24d1f3bb35c034 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r--tools/qmlscene/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 83d6ce5d72..58a45781a2 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -496,6 +496,9 @@ int main(int argc, char ** argv)
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
QCoreApplication::setApplicationVersion(QLatin1String(QT_VERSION_STR));
+ if (qEnvironmentVariableIsSet("QMLSCENE_CORE_PROFILE"))
+ options.coreProfile = true;
+
const QStringList arguments = QCoreApplication::arguments();
for (int i = 1, size = arguments.size(); i < size; ++i) {
if (!arguments.at(i).startsWith(QLatin1Char('-'))) {
@@ -522,8 +525,7 @@ int main(int argc, char ** argv)
options.resizeViewToRootItem = true;
else if (lowerArgument == QLatin1String("--multisample"))
options.multisample = true;
- else if (lowerArgument == QLatin1String("--core-profile")
- || qEnvironmentVariableIsSet("QMLSCENE_CORE_PROFILE"))
+ else if (lowerArgument == QLatin1String("--core-profile"))
options.coreProfile = true;
else if (lowerArgument == QLatin1String("--verbose"))
options.verbose = true;