diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index 09f9a236fc0..0290d965e0d 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -273,7 +273,7 @@ static struct { QString strforever; ProString strTEMPLATE; ProString strQMAKE_DIR_SEP; - QHash expands; + QHash expands; QHash functions; QHash varList; QHash varMap; @@ -340,7 +340,7 @@ void ProFileEvaluator::Private::initStatics() { "replace", E_REPLACE } }; for (unsigned i = 0; i < sizeof(expandInits)/sizeof(expandInits[0]); ++i) - statics.expands.insert(QLatin1String(expandInits[i].name), expandInits[i].func); + statics.expands.insert(ProString(expandInits[i].name), expandInits[i].func); static const struct { const char * const name; @@ -1919,7 +1919,13 @@ ProStringList ProFileEvaluator::Private::evaluateExpandFunction( ProStringList ProFileEvaluator::Private::evaluateExpandFunction( const ProString &func, const ProStringList &args) { - ExpandFunc func_t = ExpandFunc(statics.expands.value(func.toQString(m_tmp1).toLower())); + ExpandFunc func_t = ExpandFunc(statics.expands.value(func)); + if (func_t == 0) { + const QString &fn = func.toQString(m_tmp1); + const QString &lfn = fn.toLower(); + if (!fn.isSharedWith(lfn)) + func_t = ExpandFunc(statics.expands.value(ProString(lfn))); + } ProStringList ret;