diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-04 11:27:59 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-04 11:30:39 +0100 |
commit | 21c61b26bfb7d6bafac848effd0a169db48ad991 (patch) | |
tree | 4506020e9c61afd641a442b71e33ef661bab847e /src/linguist/shared/qmakeevaluator.cpp | |
parent | ae9472a39327ce5d5d6735308bd2aef272771391 (diff) | |
parent | b5cb222357841b8dad6fc80aa8e6e88047f20c00 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I4ee208f69bed72c480c636cb18f22fd88c02d1e5
Diffstat (limited to 'src/linguist/shared/qmakeevaluator.cpp')
-rw-r--r-- | src/linguist/shared/qmakeevaluator.cpp | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp index 6a7e7fa8c..7d09ef9b3 100644 --- a/src/linguist/shared/qmakeevaluator.cpp +++ b/src/linguist/shared/qmakeevaluator.cpp @@ -1947,23 +1947,34 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFeatureFile( // needs to be determined. Failed lookups are represented via non-null empty strings. QString *fnp = &m_featureRoots->cache[qMakePair(fn, currFn)]; if (fnp->isNull()) { - int start_root = 0; - const QStringList &paths = m_featureRoots->paths; - if (!currFn.isEmpty()) { - QStringRef currPath = IoUtils::pathName(currFn); - for (int root = 0; root < paths.size(); ++root) - if (currPath == paths.at(root)) { - start_root = root + 1; - break; - } - } - for (int root = start_root; root < paths.size(); ++root) { - QString fname = paths.at(root) + fn; - if (IoUtils::exists(fname)) { - fn = fname; +#ifdef QMAKE_OVERRIDE_PRFS + { + QString ovrfn(QLatin1String(":/qmake/override_features/") + fn); + if (QFileInfo::exists(ovrfn)) { + fn = ovrfn; goto cool; } } +#endif + { + int start_root = 0; + const QStringList &paths = m_featureRoots->paths; + if (!currFn.isEmpty()) { + QStringRef currPath = IoUtils::pathName(currFn); + for (int root = 0; root < paths.size(); ++root) + if (currPath == paths.at(root)) { + start_root = root + 1; + break; + } + } + for (int root = start_root; root < paths.size(); ++root) { + QString fname = paths.at(root) + fn; + if (IoUtils::exists(fname)) { + fn = fname; + goto cool; + } + } + } #ifdef QMAKE_BUILTIN_PRFS fn.prepend(QLatin1String(":/qmake/features/")); if (QFileInfo::exists(fn)) |