From f2b31fdb6bb357c0c5c97d4fabd2561da3ba2093 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 16 Dec 2016 13:11:49 +0100 Subject: make QMAKE_DIR_SEP magic on writing since ab0cc305, the spec will be replaced by an entirely new one during configuration, and so needs to update the path separator for $$shell_{path,quote}(). however, the latter didn't happen, as the spec reloading doesn't go through the "real" spec loading path. Change-Id: I45ab3156b8e040f683328ac46e48b09c2eb94ef7 Reviewed-by: Joerg Bornemann --- qmake/library/qmakeevaluator.cpp | 5 +++-- qmake/library/qmakeevaluator_p.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'qmake/library') diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 4ca87e8bc7..69e216d3da 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -152,6 +152,7 @@ void QMakeEvaluator::initStatics() statics.strhost_build = QLatin1String("host_build"); statics.strTEMPLATE = ProKey("TEMPLATE"); statics.strQMAKE_PLATFORM = ProKey("QMAKE_PLATFORM"); + statics.strQMAKE_DIR_SEP = ProKey("QMAKE_DIR_SEP"); statics.strQMAKESPEC = ProKey("QMAKESPEC"); #ifdef PROEVALUATOR_FULL statics.strREQUIRES = ProKey("REQUIRES"); @@ -938,6 +939,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProVariable( setTemplate(); else if (varName == statics.strQMAKE_PLATFORM) m_featureRoots = 0; + else if (varName == statics.strQMAKE_DIR_SEP) + m_dirSep = first(varName); else if (varName == statics.strQMAKESPEC) { if (!values(varName).isEmpty()) { QString spec = values(varName).first().toQString(); @@ -1218,8 +1221,6 @@ bool QMakeEvaluator::loadSpecInternal() // This also ensures that m_featureRoots is valid. if (evaluateFeatureFile(QLatin1String("spec_post.prf")) != ReturnTrue) return false; - // The MinGW and x-build specs may change the separator; $$shell_{path,quote}() need it - m_dirSep = first(ProKey("QMAKE_DIR_SEP")); return true; } diff --git a/qmake/library/qmakeevaluator_p.h b/qmake/library/qmakeevaluator_p.h index f444e0d0be..42aaef70c3 100644 --- a/qmake/library/qmakeevaluator_p.h +++ b/qmake/library/qmakeevaluator_p.h @@ -78,6 +78,7 @@ struct QMakeStatics { QString strhost_build; ProKey strTEMPLATE; ProKey strQMAKE_PLATFORM; + ProKey strQMAKE_DIR_SEP; ProKey strQMAKESPEC; #ifdef PROEVALUATOR_FULL ProKey strREQUIRES; -- cgit v1.2.3