~ubuntu-branches/ubuntu/vivid/qtdeclarative-opensource-src-gles/vivid

« back to all changes in this revision

Viewing changes to debian/patches/Fix-bindings-to-when-property-of-States-not-always-w.patch

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2014-10-29 07:54:05 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20141029075405-gq1uzomnw3but9g2
Tags: 5.3.2-0ubuntu1
Sync package with qtdeclarative-opensource-src - 5.3.2-3ubuntu1 

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
5
 
 
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
11
 
different location.
12
 
 
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.
17
 
 
18
 
Task-number: QTBUG-39421
19
 
Change-Id: Iec8609848b632afa52aa42cf0b807330c74f6f3a
20
 
---
21
 
 src/qml/qml/qqmlengine.cpp | 1 +
22
 
 1 file changed, 1 insertion(+)
23
 
 
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*>();
33
 
 
34
 
     v8engine()->setEngine(q);
35
 
 
36
 
2.1.0
37