summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcompiler.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-27 01:41:49 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-27 01:41:49 (GMT)
commit809244977033abf2bd934244c9b88b39d8ba1f8a (patch)
treebdba2da7cf3d2ab2181f816d6f8f97f11e8b07a4 /src/declarative/qml/qmlcompiler.cpp
parentb1a5b6c40c6c76d44d9afc24c6cddf1d2abf7b29 (diff)
downloadQt-809244977033abf2bd934244c9b88b39d8ba1f8a.zip
Qt-809244977033abf2bd934244c9b88b39d8ba1f8a.tar.gz
Qt-809244977033abf2bd934244c9b88b39d8ba1f8a.tar.bz2
Error when a QVariant property is used as a grouped property
This crashed as the metatype of QVariant is -1.
Diffstat (limited to 'src/declarative/qml/qmlcompiler.cpp')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 69ebf9c..60282dc 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -1687,7 +1687,7 @@ bool QmlCompiler::buildGroupedProperty(QmlParser::Property *prop,
if (prop->type < (int)QVariant::UserType) {
QmlEnginePrivate *ep =
static_cast<QmlEnginePrivate *>(QObjectPrivate::get(engine));
- if (ep->valueTypes[prop->type]) {
+ if (prop->type >= 0 /* QVariant == -1 */ && ep->valueTypes[prop->type]) {
COMPILE_CHECK(buildValueTypeProperty(ep->valueTypes[prop->type],
prop->value, obj, ctxt.incr()));
obj->addValueTypeProperty(prop);