summaryrefslogtreecommitdiffstats
path: root/src/sdk
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-02-12 15:17:39 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-02-15 16:26:09 +0200
commit2690fc7c7669c46f326f01f356e71f9d3d1b7e80 (patch)
tree07f4286608e0cdbfdb5e196cf0233cee126374cc /src/sdk
parentc4a3a9d269335cdfc96af96583133f822a9a86de (diff)
CLI: Add warning when cli-only options are used without command keyword
Task-number: QTIFW-2046 Change-Id: Id1c3d24e8c385bdfbe0a7837be774f885a192aa4 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/sdk')
-rw-r--r--src/sdk/sdkapp.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h
index ad40e0a42..e35759e0f 100644
--- a/src/sdk/sdkapp.h
+++ b/src/sdk/sdkapp.h
@@ -173,6 +173,16 @@ public:
qCDebug(QInstaller::lcInstallerInstallLog).noquote() << "Arguments:" <<
QCoreApplication::arguments().join(QLatin1String(", "));
+ for (auto &optionName : m_parser.optionNames()) {
+ if (isCommandLineInterface)
+ break;
+
+ if (m_parser.optionContextFlags(optionName) & CommandLineParser::CommandLineOnly) {
+ qCWarning(QInstaller::lcInstallerInstallLog).nospace() << "Found command line only option "
+ << optionName << ". This will not have any effect when running in graphical mode.";
+ }
+ }
+
dumpResourceTree();
SDKApp::registerMetaResources(manager.collectionByName("QResources"));