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:
parent
4c2ec88932
commit
46ed14da32
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in New Issue