diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-12-17 23:11:52 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-12-17 23:11:52 (GMT) |
commit | 67b89083b2d8667a89276488968873585790b868 (patch) | |
tree | be5a447012fcd98ca21c408c19b3c95060185f14 | |
parent | 4cc135c24f7bc6463963f338f9d696d576b50cf0 (diff) | |
download | Qt-67b89083b2d8667a89276488968873585790b868.zip Qt-67b89083b2d8667a89276488968873585790b868.tar.gz Qt-67b89083b2d8667a89276488968873585790b868.tar.bz2 |
Section properties can only be model data.
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp index d4d07cc..8131b4c 100644 --- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp @@ -895,16 +895,11 @@ QVariant QmlGraphicsVisualDataModel::value(int index, const QString &name) QVariant val; QObject *nobj = d->m_cache.item(index); if (nobj) { - val = QmlEngine::contextForObject(nobj)->contextProperty(name); + val = d->data(nobj)->property(name.toUtf8()); } else { - QmlContext *ccontext = d->m_context; - if (!ccontext) ccontext = qmlContext(this); - QmlContext *ctxt = new QmlContext(ccontext); QmlGraphicsVisualDataModelData *data = new QmlGraphicsVisualDataModelData(index, this); - ctxt->addDefaultObject(data); - val = ctxt->contextProperty(name); + val = data->property(name.toUtf8()); delete data; - delete ctxt; } return val; |