diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-03-01 16:43:46 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-03-29 18:14:38 +0000 |
commit | 38f6b6242edeef56ce68f1357ea9f85a6563f09a (patch) | |
tree | be22a633abf7e00d547d10a94829e20496da7f39 | |
parent | 72f8f994b26fe51bf4828e17096b7ec0abe1f0d3 (diff) |
qmake: prevent .prf files from postponing work to build passes
just a sync-up from lupdate; no effect on qmake itself.
alternative source: qt-creator/7e86b98836342035684cc1c1aa49292224faed07.
Change-Id: I5e10b44637d527799f55c578a99076eb4750f131
(cherry picked from qttools/8e7e60dbdea04c943bc6d50290db12d3fefd39f2)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | qmake/library/qmakeevaluator.cpp | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 6e6c72de59..edd1d5f38f 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -1980,23 +1980,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)) |