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>
This commit is contained in:
Frank Osterfeld 2017-08-16 18:23:04 +02:00 committed by Simon Hausmann
parent 4c2ec88932
commit 46ed14da32
1 changed files with 5 additions and 2 deletions

View File

@ -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;
}
}
/*!