From dbc7ed82149d8915a32489a0d3a930d2793c6e65 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 5 Jun 2014 12:30:07 +0200 Subject: Ensure that there is no duplication of the output directory in output When a relative path was specified as the output then it would be in both Option::output_dir and Option::output. Therefore in that case Option::output should be just the filename as Option::output_dir has the correct path to output to. Task-number: QTBUG-39460 Change-Id: Idc988e6bad94f34b89660fb5e8d6fa3a39dc623b Reviewed-by: Oswald Buddenhagen --- qmake/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qmake/main.cpp') diff --git a/qmake/main.cpp b/qmake/main.cpp index f5116ba752..82573a61fc 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -252,8 +252,10 @@ int runQMake(int argc, char **argv) #endif if(!dir.isNull() && dir != ".") Option::output_dir = dir; - if(QDir::isRelativePath(Option::output_dir)) + if (QDir::isRelativePath(Option::output_dir)) { + Option::output.setFileName(fi.fileName()); Option::output_dir.prepend(oldpwd + QLatin1Char('/')); + } Option::output_dir = QDir::cleanPath(Option::output_dir); } -- cgit v1.2.3