summaryrefslogtreecommitdiffstats
path: root/qmake/library/qmakeevaluator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/library/qmakeevaluator.cpp')
-rw-r--r--qmake/library/qmakeevaluator.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index 73ea10daf8..efda9df7d4 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -912,8 +912,11 @@ void QMakeEvaluator::visitProVariable(
m_featureRoots = 0;
else if (varName == statics.strQMAKESPEC) {
if (!values(varName).isEmpty()) {
- m_qmakespec = values(varName).first().toQString();
- m_featureRoots = 0;
+ QString spec = values(varName).first().toQString();
+ if (IoUtils::isAbsolutePath(spec)) {
+ m_qmakespec = spec;
+ m_featureRoots = 0;
+ }
}
}
#ifdef PROEVALUATOR_FULL
@@ -1159,8 +1162,11 @@ bool QMakeEvaluator::loadSpecInternal()
// the source of the qmake.conf at the end of the default/qmake.conf in
// the QMAKESPEC_ORIGINAL variable.
const ProString &orig_spec = first(ProKey("QMAKESPEC_ORIGINAL"));
- if (!orig_spec.isEmpty())
- m_qmakespec = orig_spec.toQString();
+ if (!orig_spec.isEmpty()) {
+ QString spec = orig_spec.toQString();
+ if (IoUtils::isAbsolutePath(spec))
+ m_qmakespec = spec;
+ }
# endif
#endif
valuesRef(ProKey("QMAKESPEC")) = ProString(m_qmakespec);