aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-10-05 11:01:10 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2017-10-05 12:39:47 +0000
commitf305f835cf3b0aa8bfb44b52718511a279c854f9 (patch)
tree59fce8f896cab1a57362f3ab31d11f950c9fd2f8 /src/app
parentd4ae9eac017bf3ddb9f1619d4fa574544a7a7829 (diff)
Improve status command
- Indent also the untracked and missing file lists. - Remove pointless options. - Fix help output and CLI documentation. Change-Id: Iba23ad7fc3366cfac02b255b17cca9127556b9bb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/qbs/commandlinefrontend.cpp3
-rw-r--r--src/app/qbs/parser/parsercommand.cpp11
-rw-r--r--src/app/qbs/status.cpp4
3 files changed, 6 insertions, 12 deletions
diff --git a/src/app/qbs/commandlinefrontend.cpp b/src/app/qbs/commandlinefrontend.cpp
index 231bbebe9..746e7ffff 100644
--- a/src/app/qbs/commandlinefrontend.cpp
+++ b/src/app/qbs/commandlinefrontend.cpp
@@ -151,7 +151,8 @@ void CommandLineFrontend::start()
params.setOverrideBuildGraphData(m_parser.command() == ResolveCommandType);
params.setPropertyCheckingMode(ErrorHandlingMode::Strict);
if (!m_parser.buildBeforeInstalling() || m_parser.command() == DumpNodesTreeCommandType
- || m_parser.command() == CleanCommandType) {
+ || m_parser.command() == CleanCommandType
+ || m_parser.command() == StatusCommandType) {
params.setRestoreBehavior(SetupProjectParameters::RestoreOnly);
}
foreach (const QVariantMap &buildConfig, m_parser.buildConfigurations()) {
diff --git a/src/app/qbs/parser/parsercommand.cpp b/src/app/qbs/parser/parsercommand.cpp
index 70d6893d9..791a494b6 100644
--- a/src/app/qbs/parser/parsercommand.cpp
+++ b/src/app/qbs/parser/parsercommand.cpp
@@ -443,8 +443,7 @@ QString StatusCommand::shortDescription() const
QString StatusCommand::longDescription() const
{
- QString description = Tr::tr(
- "qbs %1 [options] [configuration-name] [property:value] ...\n")
+ QString description = Tr::tr("qbs %1 [options] [configuration-name]\n")
.arg(representation());
description += Tr::tr("Lists all the files in the project directory and shows whether "
"they are known to qbs in the respective configuration.\n");
@@ -458,13 +457,7 @@ QString StatusCommand::representation() const
QList<CommandLineOption::Type> StatusCommand::supportedOptions() const
{
- return QList<CommandLineOption::Type>()
- << CommandLineOption::FileOptionType
- << CommandLineOption::BuildDirectoryOptionType
- << CommandLineOption::LogLevelOptionType
- << CommandLineOption::VerboseOptionType
- << CommandLineOption::QuietOptionType
- << CommandLineOption::ShowProgressOptionType;
+ return QList<CommandLineOption::Type>({CommandLineOption::BuildDirectoryOptionType});
}
QString UpdateTimestampsCommand::shortDescription() const
diff --git a/src/app/qbs/status.cpp b/src/app/qbs/status.cpp
index 814d63c1c..aa018429d 100644
--- a/src/app/qbs/status.cpp
+++ b/src/app/qbs/status.cpp
@@ -156,11 +156,11 @@ int printStatus(const ProjectData &project)
qbsInfo() << "\nMissing files:";
foreach (const QString &untrackedFile, missingFiles)
- qbsInfo() << untrackedFile.mid(projectDirectoryPathLength + 1);
+ qbsInfo() << " " << untrackedFile.mid(projectDirectoryPathLength + 1);
qbsInfo() << "\nUntracked files:";
foreach (const QString &missingFile, untrackedFilesInProject)
- qbsInfo() << missingFile.mid(projectDirectoryPathLength + 1);
+ qbsInfo() << " " << missingFile.mid(projectDirectoryPathLength + 1);
return 0;
}