summaryrefslogtreecommitdiff
path: root/src/app/qbs-setup-qt/commandlineparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/qbs-setup-qt/commandlineparser.cpp')
-rw-r--r--src/app/qbs-setup-qt/commandlineparser.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/app/qbs-setup-qt/commandlineparser.cpp b/src/app/qbs-setup-qt/commandlineparser.cpp
index 2559e0c0b..8444faa77 100644
--- a/src/app/qbs-setup-qt/commandlineparser.cpp
+++ b/src/app/qbs-setup-qt/commandlineparser.cpp
@@ -49,6 +49,7 @@ static QString helpOptionShort() { return QLatin1String("-h"); }
static QString helpOptionLong() { return QLatin1String("--help"); }
static QString detectOption() { return QLatin1String("--detect"); }
static QString settingsDirOption() { return QLatin1String("--settings-dir"); }
+static QString systemOption() { return QLatin1String("--system"); }
void CommandLineParser::parse(const QStringList &commandLine)
{
@@ -73,6 +74,8 @@ void CommandLineParser::parse(const QStringList &commandLine)
m_helpRequested = true;
else if (arg == detectOption())
m_autoDetectionMode = true;
+ else if (arg == systemOption())
+ m_settingsScope = qbs::Settings::SystemScope;
else if (arg == settingsDirOption())
assignOptionArgument(settingsDirOption(), m_settingsDir);
}
@@ -107,10 +110,10 @@ QString CommandLineParser::usageString() const
{
QString s = Tr::tr("This tool creates qbs profiles from Qt versions.\n");
s += Tr::tr("Usage:\n");
- s += Tr::tr(" %1 [%2 <settings directory>] %3\n")
- .arg(m_command, settingsDirOption(), detectOption());
- s += Tr::tr(" %1 [%2 <settings directory>] <path to qmake> <profile name>\n")
- .arg(m_command, settingsDirOption());
+ s += Tr::tr(" %1 [%2 <settings directory>] [%4] %3\n")
+ .arg(m_command, settingsDirOption(), detectOption(), systemOption());
+ s += Tr::tr(" %1 [%2 <settings directory>] [%4] <path to qmake> <profile name>\n")
+ .arg(m_command, settingsDirOption(), systemOption());
s += Tr::tr(" %1 %2|%3\n").arg(m_command, helpOptionShort(), helpOptionLong());
s += Tr::tr("The first form tries to auto-detect all known Qt versions, looking them up "
"via the PATH environment variable.\n");