From 6baa546e2e3403ab51cf46baeefbe0658b0f45ca Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 21 Jul 2014 12:18:42 +0200 Subject: 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 --- src/app/qbs/parser/commandlineparser.cpp | 6 ++---- 1 file 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) { -- cgit v1.2.3