diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-27 01:41:49 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-27 01:41:49 (GMT) |
commit | 809244977033abf2bd934244c9b88b39d8ba1f8a (patch) | |
tree | bdba2da7cf3d2ab2181f816d6f8f97f11e8b07a4 /src/declarative/qml/qmlcompiler.cpp | |
parent | b1a5b6c40c6c76d44d9afc24c6cddf1d2abf7b29 (diff) | |
download | Qt-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.cpp | 2 |
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); |