aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-12-03 15:21:58 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-03 23:08:41 +0000
commit5d7468d56f9c9100e613d4c3516394b5983e6291 (patch)
treef63dd6ac5d9aa269a007dbfd9fa7e538c916a43a /src
parentbb50209308c3d82dd9c4c3f4c07f833f8c7638ff (diff)
QML engine: Fix binding setup
We set QProperty bindings up in the wrong way: Parent components would overwrite their child component's binding. This patch reverses the order, fixing the bug. Task-number: QTBUG-87153 Change-Id: I3e90d1d14a41a7c5c337745f1453484d360a3979 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 96e321bc5cf3c1a6d52374a6f4070a438032b08d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 43c639ce8d..2883cb3031 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -1423,12 +1423,12 @@ bool QQmlObjectCreator::finalize(QQmlInstantiationInterrupt &interrupt)
}
while (!sharedState->allQPropertyBindings.isEmpty()) {
- auto& [target, index, qmlBinding] = sharedState->allQPropertyBindings.last();
+ auto& [target, index, qmlBinding] = sharedState->allQPropertyBindings.first();
QUntypedBindable bindable;
void *argv[] = { &bindable };
target->qt_metacall(QMetaObject::BindableProperty, index, argv);
bindable.setBinding(qmlBinding);
- sharedState->allQPropertyBindings.pop_back();
+ sharedState->allQPropertyBindings.pop_front();
if (watcher.hasRecursed() || interrupt.shouldInterrupt())
return false;
}