aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Osterfeld <frank.osterfeld@kdab.com>2017-08-16 18:23:04 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-08-18 19:11:00 +0000
commit46ed14da325c6c0382c0bc54cacc347d2d7f2b0a (patch)
treeaf3df284d3a837c3fe8720095472f9a424dd1e97
parent4c2ec889328b0a3988e7a7e8f4cae434e647f8cc (diff)
Retranslate all child contexts
Do not only reevaluate the expressions of the first child, but of all child contexts. Task-number: QTBUG-15602 Change-Id: Ieacc441f14f7a26793bfcdc2206030a78d2d429c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/qml/qml/qqmlengine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index eb2fbcdd73..194c58b805 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1342,8 +1342,11 @@ void QQmlEngine::setOutputWarningsToStandardError(bool enabled)
void QQmlEngine::retranslate()
{
Q_D(QQmlEngine);
- if (QQmlContextData *firstChildContext = QQmlContextData::get(d->rootContext)->childContexts)
- firstChildContext->refreshExpressions();
+ QQmlContextData *context = QQmlContextData::get(d->rootContext)->childContexts;
+ while (context) {
+ context->refreshExpressions();
+ context = context->nextChild;
+ }
}
/*!