summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlparser.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-05-06 00:56:28 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-05-06 01:01:17 (GMT)
commit547223a4f31067ed34acabd9a2d8a0b7645fd3f8 (patch)
treeb4e676646c7f9b569428784d255c22fdca9467df /src/declarative/qml/qmlparser.cpp
parentb291ab1f5ebb496d7eb7aae04c3f06d57a4f547d (diff)
downloadQt-547223a4f31067ed34acabd9a2d8a0b7645fd3f8.zip
Qt-547223a4f31067ed34acabd9a2d8a0b7645fd3f8.tar.gz
Qt-547223a4f31067ed34acabd9a2d8a0b7645fd3f8.tar.bz2
Fix crash
As QMetaObject::indexOfProperty() downcasts QMetaObject's that have the DynamicMetaObject flag set, we must ensure that we use a QAbstractDynamicMetaObject whereever we set this flag, otherwise it may crash.
Diffstat (limited to 'src/declarative/qml/qmlparser.cpp')
-rw-r--r--src/declarative/qml/qmlparser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/qml/qmlparser.cpp b/src/declarative/qml/qmlparser.cpp
index a943c4d..d68eb68 100644
--- a/src/declarative/qml/qmlparser.cpp
+++ b/src/declarative/qml/qmlparser.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
using namespace QmlParser;
QmlParser::Object::Object()
-: type(-1), metatype(0), extObject(0), defaultProperty(0), line(-1), column(-1)
+: type(-1), metatype(0), extObjectData(0), defaultProperty(0), line(-1), column(-1)
{
}
@@ -76,8 +76,8 @@ QmlParser::Object::~Object()
const QMetaObject *Object::metaObject() const
{
- if (extObject && metatype)
- return extObject;
+ if (extObjectData && metatype)
+ return &extObject;
else
return metatype;
}