aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-12-03 15:21:58 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-12-03 21:46:24 +0100
commit96e321bc5cf3c1a6d52374a6f4070a438032b08d (patch)
tree62bf3e0ddc9d65660c3ef9b4a68e6e93cd68508d /src/qml/qml/qqmlobjectcreator.cpp
parent6eb35df60e061b9ce4e88f97a174216e2b1c617f (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 Pick-to: 6.0 Change-Id: I3e90d1d14a41a7c5c337745f1453484d360a3979 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-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 76d1bd20bd..0a50234136 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -1429,12 +1429,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;
}