aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcompileddata.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-12 14:43:56 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 14:26:01 +0200
commit6042327dee1f8dd912a86be16f4044d259c9b3e4 (patch)
tree48091ee06fc657dcbdd090a27b3ed0eec88bc55b /src/qml/qml/qqmlcompileddata.cpp
parentbbb78a92a910d32b2886af62c218db87325eb6ce (diff)
[new compiler] Initial support for group properties
This implements support for "font.pixelSize: 24" for example. The representation in the compile data structure is so that font.pixelSize is short-hand for font { pixelSize: 24 } which means that inside the braces is a complete object initializer. For that initializer we create a dedicated CompiledData::Object, which however has its type name empty. When populating the outer instance then, the "font" property is read as QQmlValueType (a QObject) and instead of creating a new QObject we use that value type as instance to run the rest of the QML object initializer (everything in braces). Change-Id: Ic0a37ac77ab88f582546b9c09a3d06a07726420b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcompileddata.cpp')
-rw-r--r--src/qml/qml/qqmlcompileddata.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcompileddata.cpp b/src/qml/qml/qqmlcompileddata.cpp
index f9e36d59d2..35de0ac358 100644
--- a/src/qml/qml/qqmlcompileddata.cpp
+++ b/src/qml/qml/qqmlcompileddata.cpp
@@ -125,7 +125,8 @@ QQmlCompiledData::~QQmlCompiledData()
}
for (int ii = 0; ii < propertyCaches.count(); ++ii)
- propertyCaches.at(ii)->release();
+ if (propertyCaches.at(ii))
+ propertyCaches.at(ii)->release();
for (int ii = 0; ii < scripts.count(); ++ii)
scripts.at(ii)->release();