aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-07-21 12:18:42 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-07-21 15:10:58 +0200
commit6baa546e2e3403ab51cf46baeefbe0658b0f45ca (patch)
tree6db43f521f84a2932b69c5ff4d68d9da94871b88
parent493caae6e820e7f9bf1860cc0904157f50b9c576 (diff)
don't print usage on missing project file
This error is obvious enough to not show the entire help. Also, this behavior is consistent with "qbs -f /dir" where /dir doesn't contain a project file. Change-Id: Icb0a4d8ce41d7480e02aca262faf14922aecab6e Task-number: QBS-655 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-rw-r--r--src/app/qbs/parser/commandlineparser.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/app/qbs/parser/commandlineparser.cpp b/src/app/qbs/parser/commandlineparser.cpp
index ff3bd1616..64284c4fb 100644
--- a/src/app/qbs/parser/commandlineparser.cpp
+++ b/src/app/qbs/parser/commandlineparser.cpp
@@ -434,12 +434,10 @@ void CommandLineParser::CommandLineParserPrivate::setupProjectFile()
= QDir(projectFilePath).entryList(namePatterns, QDir::Files);
if (actualFileNames.isEmpty()) {
QString error;
- if (optionPool.fileOption()->projectFilePath().isEmpty()) {
+ if (optionPool.fileOption()->projectFilePath().isEmpty())
error = Tr::tr("No project file given and none found in current directory.\n");
- error += Tr::tr("Usage: %1").arg(command->longDescription());
- } else {
+ else
error = Tr::tr("No project file found in directory '%1'.").arg(projectFilePath);
- }
throw ErrorInfo(error);
}
if (actualFileNames.count() > 1) {