diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-09-06 14:12:51 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-08 09:00:25 +0200 |
commit | 2ed0cd0602093d316bfbce6b1f3f8f8bfe026fca (patch) | |
tree | be7ac70188f15c60706c2c05cad9a8917df4d3eb /src/qml/qml/qqmlobjectcreator_p.h | |
parent | 34b6914970958ace37a3654600637b6fd3d2435c (diff) |
Fix error reporting in the new object creator
Propagate error conditions from createVMEMetaObjectAndPropertyCache to the caller
and properly clean up refcounts (using QQmlRefPointer)
Also fixed qmlscene to report errors if create() failed.
Change-Id: I75d984798a197c102078e5d5638ed92f167ab49f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator_p.h')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator_p.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h index 6a2b28c35d..553be6f075 100644 --- a/src/qml/qml/qqmlobjectcreator_p.h +++ b/src/qml/qml/qqmlobjectcreator_p.h @@ -64,7 +64,10 @@ struct Q_QML_EXPORT QmlObjectCreator QList<QQmlError> errors; - bool createVMEMetaObjectAndPropertyCache(const QV4::CompiledData::Object *obj, QQmlPropertyCache *baseTypeCache, QQmlPropertyCache **cache, QByteArray *vmeMetaObjectData) const; + static bool needsCustomMetaObject(const QV4::CompiledData::Object *obj); + bool createVMEMetaObjectAndPropertyCache(const QV4::CompiledData::Object *obj, QQmlPropertyCache *baseTypeCache, + // out parameters + QQmlPropertyCache **cache, QByteArray *vmeMetaObjectData); private: QString stringAt(int idx) const { return unit->header.stringAt(idx); } @@ -87,7 +90,7 @@ private: QObject *_object; QQmlData *_ddata; - QQmlPropertyCache *_propertyCache; + QQmlRefPointer<QQmlPropertyCache> _propertyCache; }; } // end namespace QtQml |