1
From 9ff229663b2240e42d1c1888dc3b630d053e102a Mon Sep 17 00:00:00 2001
2
From: Simon Hausmann <simon.hausmann@digia.com>
3
Date: Wed, 4 Jun 2014 13:49:50 +0200
4
Subject: [PATCH] Fix bindings to when property of States not always working
6
The "when" property is of type QQmlBinding* and we special case that type when
7
writing property bindings. However in order for that to work, the meta-type for
8
QQmlBinding* needs to be registered at the point in time when resolving
9
properties in the type compiler. In Qt 5.1/5.2 this worked by accident due to
10
a different code paths that implicitly registered the meta-type earlier from a
13
There are a couple of property types for which we have special handling, such as
14
QQmlV4Handler and QJSvalue, besides QQmlBinding*. We do register them explicitly
15
at engine initialization time, and therefore we should also initialize the meta-type
16
for QQmlBinding* there.
18
Task-number: QTBUG-39421
19
Change-Id: Iec8609848b632afa52aa42cf0b807330c74f6f3a
21
src/qml/qml/qqmlengine.cpp | 1 +
22
1 file changed, 1 insertion(+)
24
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
25
index 610bbcf..0424c57 100644
26
--- a/src/qml/qml/qqmlengine.cpp
27
+++ b/src/qml/qml/qqmlengine.cpp
28
@@ -812,6 +812,7 @@ void QQmlEnginePrivate::init()
29
qRegisterMetaType<QList<QObject*> >();
30
qRegisterMetaType<QList<int> >();
31
qRegisterMetaType<QQmlV4Handle>();
32
+ qRegisterMetaType<QQmlBinding*>();
34
v8engine()->setEngine(q);