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 <oswald.buddenhagen@digia.com>
This commit is contained in:
Andy Shaw 2014-06-05 12:30:07 +02:00 committed by The Qt Project
parent 3441738d5f
commit dbc7ed8214

View File

@ -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);
}