summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-02-25 10:04:58 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-02-25 10:43:59 (GMT)
commit68c909373d96f61f1a06cfb486df320e56b2e75a (patch)
treebb7c60a57989576cc1445deaec2e936d50434077
parente9b0a7abece9e23e98155b4a4ab07799d36f6230 (diff)
downloadQt-68c909373d96f61f1a06cfb486df320e56b2e75a.zip
Qt-68c909373d96f61f1a06cfb486df320e56b2e75a.tar.gz
Qt-68c909373d96f61f1a06cfb486df320e56b2e75a.tar.bz2
Fix SymbianMakefileGenerator::absolutizePath for clean builds
QFileInfo::isDir() will not return correct value if path doesn't exist like it doesn't in case of clean builds. Turned the check around and used isFile() instead. If a file is given as origPath, it is assumed to exist, because it was explicitly given with HEADERS variable and qmake will give warning if nonexisted file is given there. Reviewed-by: Janne Koskinen
-rw-r--r--qmake/generators/symbian/symmake.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index a7eca54..ee579bb 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -147,10 +147,14 @@ QString SymbianMakefileGenerator::absolutizePath(const QString& origPath)
resultPath = QDir::fromNativeSeparators(epocRoot()) + resultPath.mid(1);
QFileInfo fi(fileInfo(resultPath));
- if (fi.isDir()) {
- resultPath = fi.absoluteFilePath();
- } else {
+
+ // Since origPath can be something given in HEADERS, we need to check if we are dealing
+ // with a file or a directory. In case the origPath doesn't yet exist, isFile() returns
+ // false and we default to assuming it is a dir.
+ if (fi.isFile()) {
resultPath = fi.absolutePath();
+ } else {
+ resultPath = fi.absoluteFilePath();
}
resultPath = QDir::cleanPath(resultPath);