summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2010-08-17 14:00:17 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2010-08-17 14:08:36 (GMT)
commitf087ad801b19ffa32a538269cd1475ead963f013 (patch)
treefdf35b251602ef5b4515b20cb3df60212ac6c332 /qmake/generators
parent35abe608440f2effd330fd213955e391c4a412a2 (diff)
downloadQt-f087ad801b19ffa32a538269cd1475ead963f013.zip
Qt-f087ad801b19ffa32a538269cd1475ead963f013.tar.gz
Qt-f087ad801b19ffa32a538269cd1475ead963f013.tar.bz2
qmake: fix assertion on Windows when DESTDIR is empty in static libs
Basically replacing project->values("foo").first() with project->first("foo") which does a null check. Task-number: QTBUG-12851 Reviewed-by: ossi
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/win32/winmakefile.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index c36cc9c..4944d06 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -472,10 +472,13 @@ void Win32MakefileGenerator::processRcFileVar()
resFile.replace(".rc", Option::res_ext);
project->values("RES_FILE").prepend(fileInfo(resFile).fileName());
if (!project->values("OBJECTS_DIR").isEmpty()) {
- if(project->isActiveConfig("staticlib"))
- project->values("RES_FILE").first().prepend(fileInfo(project->values("DESTDIR").first()).absoluteFilePath() + Option::dir_sep);
+ QString resDestDir;
+ if (project->isActiveConfig("staticlib"))
+ resDestDir = fileInfo(project->first("DESTDIR")).absoluteFilePath();
else
- project->values("RES_FILE").first().prepend(project->values("OBJECTS_DIR").first() + Option::dir_sep);
+ resDestDir = project->first("OBJECTS_DIR");
+ resDestDir.append(Option::dir_sep);
+ project->values("RES_FILE").first().prepend(resDestDir);
}
project->values("RES_FILE").first() = Option::fixPathToTargetOS(project->values("RES_FILE").first(), false, false);
project->values("POST_TARGETDEPS") += project->values("RES_FILE");