diff options
-rw-r--r-- | src/linguist/shared/qmakeevaluator.cpp | 11 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/proparsing/features/default_pre.prf | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp index b72163248..045a030b5 100644 --- a/src/linguist/shared/qmakeevaluator.cpp +++ b/src/linguist/shared/qmakeevaluator.cpp @@ -2047,6 +2047,10 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFeatureFile( #ifdef PROEVALUATOR_CUMULATIVE bool cumulative = m_cumulative; + // Even when evaluating the project in cumulative mode to maximize the + // chance of collecting all source declarations, prfs are evaluated in + // exact mode to maximize the chance of them successfully executing + // their programmatic function. m_cumulative = false; #endif @@ -2055,6 +2059,13 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFeatureFile( #ifdef PROEVALUATOR_CUMULATIVE m_cumulative = cumulative; + if (cumulative) { + // As the data collected in cumulative mode is potentially total + // garbage, yet the prfs fed with it are executed in exact mode, + // we must ignore their results to avoid that evaluation is unduly + // aborted. + ok = ReturnTrue; + } #endif return ok; } diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/features/default_pre.prf b/tests/auto/linguist/lupdate/testdata/good/proparsing/features/default_pre.prf new file mode 100644 index 000000000..1163398dd --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/features/default_pre.prf @@ -0,0 +1,2 @@ +load(default_pre) +error("utter failure!") |