From 1969991c4a4bd39ee224b0fa3c8cffa51f061757 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 1 Sep 2016 16:46:29 +0200 Subject: Fix binding re-evaluation when list model properties change This is a regression from commit 4876ea6a18ccdfd72014582aa5d50ab9f6b6ec9e, which avoided returning an expensive QObject when calling get() but also lost the ability to perform binding captures when accessing the properties. This change restores the captures by performing them by hand in get() and also triggering the notifiers directly when the values change, without creating the QObject. Task-number: QTBUG-52356 Change-Id: Ia429ffafd4032b63d3e592aa63bb0864a24e0965 Reviewed-by: Michael Brasser Reviewed-by: Lars Knoll --- src/qml/qml/qqmlnotifier.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/qml/qml/qqmlnotifier.cpp') diff --git a/src/qml/qml/qqmlnotifier.cpp b/src/qml/qml/qqmlnotifier.cpp index ea3f7a1530..e3f23b3e5d 100644 --- a/src/qml/qml/qqmlnotifier.cpp +++ b/src/qml/qml/qqmlnotifier.cpp @@ -65,6 +65,12 @@ namespace { }; } +void QQmlNotifier::notify(QQmlData *ddata, int notifierIndex) +{ + if (QQmlNotifierEndpoint *ep = ddata->notify(notifierIndex)) + emitNotify(ep, Q_NULLPTR); +} + void QQmlNotifier::emitNotify(QQmlNotifierEndpoint *endpoint, void **a) { QVarLengthArray stack; -- cgit v1.2.3