From 5ead393eba0fc9d7c05790887c53c3728b023195 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 8 Apr 2019 09:29:34 +0200 Subject: Fix qmlscene command parsing If "QMLSCENE_CORE_PROFILE" is set the command line parsing does not work anymore. Change-Id: I75ffa733562708a412d1ae341b24d1f3bb35c034 Reviewed-by: Tim Jenssen --- tools/qmlscene/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools') 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; -- cgit v1.2.3