aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-06-04 13:49:50 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-04 18:53:04 +0200
commit51ffc436cd4ded5838d8dc6569637e4dbb3bf1cf (patch)
tree797890c2fa214397a7f99ba6a4d72430cefb0201 /src/qml/qml/qqmlengine.cpp
parent0f9cf70501fdcf60d87615b3f998c85f134948ac (diff)
Fix bindings to when property of States not always working
The "when" property is of type QQmlBinding* and we special case that type when writing property bindings. However in order for that to work, the meta-type for QQmlBinding* needs to be registered at the point in time when resolving properties in the type compiler. In Qt 5.1/5.2 this worked by accident due to a different code paths that implicitly registered the meta-type earlier from a different location. There are a couple of property types for which we have special handling, such as QQmlV4Handler and QJSvalue, besides QQmlBinding*. We do register them explicitly at engine initialization time, and therefore we should also initialize the meta-type for QQmlBinding* there. Task-number: QTBUG-39421 Change-Id: Iec8609848b632afa52aa42cf0b807330c74f6f3a Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 610bbcfe1e..0424c57f97 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -812,6 +812,7 @@ void QQmlEnginePrivate::init()
qRegisterMetaType<QList<QObject*> >();
qRegisterMetaType<QList<int> >();
qRegisterMetaType<QQmlV4Handle>();
+ qRegisterMetaType<QQmlBinding*>();
v8engine()->setEngine(q);