From cfa31244eb9d16214360626723253d6a363a8d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 2 Apr 2009 11:03:58 +0200 Subject: Small changes in qmake's fileFixify Removed dead code and simplified conditionals. This should not otherwise change behavior or output of qmake in any way. Reviewed-by: mariusSO --- qmake/generators/makefile.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index d0fbcbe..3e5452e 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2735,16 +2735,9 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q ret.prepend(pwd); ret = Option::fixPathToTargetOS(ret, false, canon); } else { //fix it.. - QString qfile(Option::fixPathToLocalOS(ret, true, canon)), in_dir(in_d), out_dir(out_d); + QString out_dir = QDir(Option::output_dir).absoluteFilePath(out_d); + QString in_dir = QDir(pwd).absoluteFilePath(in_d); { - if(out_dir.isNull() || QDir::isRelativePath(out_dir)) - out_dir.prepend(Option::output_dir + "/"); - else if(out_dir == ".") - out_dir = pwd; - if(in_dir.isEmpty() || QDir::isRelativePath(in_dir)) - in_dir.prepend(pwd); - else if(in_dir == ".") - in_dir = pwd; QFileInfo in_fi(fileInfo(in_dir)); if(in_fi.exists()) in_dir = in_fi.canonicalFilePath(); @@ -2753,6 +2746,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q out_dir = out_fi.canonicalFilePath(); } + QString qfile(Option::fixPathToLocalOS(ret, true, canon)); QFileInfo qfileinfo(fileInfo(qfile)); if(out_dir != in_dir || !qfileinfo.isRelative()) { if(qfileinfo.isRelative()) { -- cgit v0.12