diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-10-26 19:18:06 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-10-29 15:10:54 +0000 |
commit | 767f783d65fdd8d154167966b75525c73036e27e (patch) | |
tree | 349005a639d86b9bcfec63534b3b8cc90af17a58 | |
parent | e7899cfcbf4c1fc4c77362973458262cadda765f (diff) |
lupdate: don't abort on prf execution errorsv5.12.0-beta4
we report all messages with a "WARNING:" prefix specifically to indicate
that the errors aren't supposed to be actually fatal in this context.
Fixes: QTBUG-62478
Change-Id: I010abf34a216993af0d33d614345f6f562f0a10e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-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!") |