diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-12-10 00:24:07 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-12-10 00:24:07 (GMT) |
commit | 4c5a4f4d520d05de6eceb58887c4b065fe103275 (patch) | |
tree | cd4e244a26374acddb176249c5814668b1eda95b /src/declarative/graphicsitems | |
parent | 97bae0afbcd754f55b2aa8e37c704437eeec8a22 (diff) | |
download | Qt-4c5a4f4d520d05de6eceb58887c4b065fe103275.zip Qt-4c5a4f4d520d05de6eceb58887c4b065fe103275.tar.gz Qt-4c5a4f4d520d05de6eceb58887c4b065fe103275.tar.bz2 |
Fix models using Package.
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp index 7530c43..c6f790c 100644 --- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp @@ -556,7 +556,7 @@ QVariant QmlGraphicsVisualDataModelPartsMetaObject::initialValue(int id) { QmlGraphicsVisualDataModel *m = new QmlGraphicsVisualDataModel; m->setParent(object()); - m->setPart(QString::fromUtf8(property(id).name())); + m->setPart(QString::fromUtf8(name(id))); m->setModel(QVariant::fromValue(static_cast<QmlGraphicsVisualDataModelParts *>(object())->model)); QVariant var = QVariant::fromValue((QObject *)m); @@ -649,7 +649,7 @@ void QmlGraphicsVisualDataModel::setModel(const QVariant &model) d->m_roles.clear(); d->m_roleNames.clear(); delete d->m_delegateDataType; - d->m_delegateDataType = new QmlOpenMetaObjectType(d->m_context->engine()); + d->m_delegateDataType = new QmlOpenMetaObjectType(d->m_context?d->m_context->engine():qmlEngine(this)); QObject *object = qvariant_cast<QObject *>(model); if (object && (d->m_listModelInterface = qobject_cast<QListModelInterface *>(object))) { |