summaryrefslogtreecommitdiff
path: root/qmake
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-02-25 12:04:58 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-02-25 12:43:59 +0200
commit68c909373d96f61f1a06cfb486df320e56b2e75a (patch)
treebb7c60a57989576cc1445deaec2e936d50434077 /qmake
parente9b0a7abece9e23e98155b4a4ab07799d36f6230 (diff)
downloadqt4-tools-68c909373d96f61f1a06cfb486df320e56b2e75a.tar.gz
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
Diffstat (limited to 'qmake')
-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 a7eca540fd..ee579bb9f4 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);