summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2012-02-23 10:43:25 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-23 21:51:24 +0100
commit8583bc914aaf2a0301e5e2655c68fcac79f5fb34 (patch)
tree602a746871e418818f70e5601d75fe71a6047998
parent804e93462e939ecae671570f3a6ed943ebf3270a (diff)
Fixed resolution of QMAKESPEC on Windows.
base_vars["QMAKESPEC_ORIGINAL"] is not guaranteed to be set the first time resolveSpec is called, since an include() can wipe it out. Change it so that resolveSpec is called repeatedly until some QMAKESPEC_ORIGINAL is set. The code which attempted to remove all of the path up to the last / was incorrect and must have been dead code (or its wrongness didn't matter) until now. Change-Id: I2b31ae10fc284ac7293c3cd95e5a2fd503ca7ab0 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
-rw-r--r--qmake/project.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 2029e068ec..a8620334d8 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1528,12 +1528,15 @@ QMakeProject::resolveSpec(QString *spec, const QString &qmakespec)
// We can't resolve symlinks as they do on Unix, so configure.exe puts the source of the
// qmake.conf at the end of the default/qmake.conf in the QMAKESPEC_ORG variable.
const QStringList &spec_org = base_vars["QMAKESPEC_ORIGINAL"];
- if (!spec_org.isEmpty()) {
+ if (spec_org.isEmpty()) {
+ // try again the next time around
+ *spec = QString();
+ } else {
*spec = spec_org.at(0);
#endif
int lastSlash = spec->lastIndexOf(QLatin1Char('/'));
if (lastSlash != -1)
- spec->remove(lastSlash + 1);
+ spec->remove(0, lastSlash + 1);
}
}
}