summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2014-04-15 09:38:12 +0200
committerKai Koehne <kai.koehne@digia.com>2014-04-25 16:34:49 +0200
commitf05f199e4dc7c1fe804af103d61875dbc4309686 (patch)
treed90c69b69fab8307da27abaff4ab24fc75615dfc
parentbd8fcd7e4f0d3ce7b97a9c81a1ceb6cf9f2f1873 (diff)
Improve error message for ConsumeOutputOperation
Avoid a warning that e.g. 'qmake.exe.exe' does not exist, when the argument was qmake.exe. Task-number: QTBUG-38343 Change-Id: Icdfc8ffc8e112b23fb0e789d6041ea7eefaf55c3 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
-rw-r--r--src/libs/installer/consumeoutputoperation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/installer/consumeoutputoperation.cpp b/src/libs/installer/consumeoutputoperation.cpp
index a2e2f0949..d3022fbf5 100644
--- a/src/libs/installer/consumeoutputoperation.cpp
+++ b/src/libs/installer/consumeoutputoperation.cpp
@@ -90,12 +90,12 @@ bool ConsumeOutputOperation::performOperation()
}
QString executablePath = arguments().at(1);
+ QFileInfo executable(executablePath);
#ifdef Q_OS_WIN
- if (!QFile::exists(executablePath))
- executablePath = executablePath + QLatin1String(".exe");
+ if (!executable.exists() && executable.suffix().isEmpty())
+ executable = QFileInfo(executablePath + QLatin1String(".exe"));
#endif
- const QFileInfo executable(executablePath);
if (!executable.exists() || !executable.isExecutable()) {
setError(UserDefinedError);
setErrorString(tr("File '%1' does not exist or is not an executable binary.").arg(