diff options
author | aavit <qt-info@nokia.com> | 2010-09-27 10:16:36 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2010-09-27 10:16:36 (GMT) |
commit | 52e36c493d579323a09957028b0fd5ebc4d43021 (patch) | |
tree | 20e2be544f034222250fa19a4e27e2ee37b958aa /src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | |
parent | c9a5ab5fd506663c5a7cd587d1b963c067d334bf (diff) | |
parent | ce2a273bab9b9094a1f0f3f60309797e11e59404 (diff) | |
download | Qt-52e36c493d579323a09957028b0fd5ebc4d43021.zip Qt-52e36c493d579323a09957028b0fd5ebc4d43021.tar.gz Qt-52e36c493d579323a09957028b0fd5ebc4d43021.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index a70886e..21d1ea7 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -621,7 +621,7 @@ QDeclarativeVisualDataModelParts::QDeclarativeVisualDataModelParts(QDeclarativeV QDeclarativeVisualDataModelPrivate::QDeclarativeVisualDataModelPrivate(QDeclarativeContext *ctxt) : m_listModelInterface(0), m_abstractItemModel(0), m_visualItemModel(0), m_delegate(0) -, m_context(ctxt), m_parts(0), m_delegateDataType(0), m_metaDataCreated(false) +, m_context(ctxt), m_modelDataPropId(-1), m_parts(0), m_delegateDataType(0), m_metaDataCreated(false) , m_metaDataCacheable(false), m_delegateValidated(false), m_completePending(false), m_listAccessor(0) { } @@ -1187,7 +1187,7 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count, if (propId != -1) { if (data->hasValue(propId)) { if (d->m_listModelInterface) { - data->setValue(propId, d->m_listModelInterface->data(idx, QList<int>() << role).value(role)); + data->setValue(propId, d->m_listModelInterface->data(idx, role)); } else if (d->m_abstractItemModel) { QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root); data->setValue(propId, d->m_abstractItemModel->data(index, role)); @@ -1202,13 +1202,13 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count, qmlInfo(this) << "Changing role not present in item: " << roleName; } } - if (roles.count() == 1) { + if (d->m_roles.count() == 1) { // Handle the modelData role we add if there is just one role. int propId = data->modelDataPropertyId(); if (data->hasValue(propId)) { - int role = roles.at(0); + int role = d->m_roles.at(0); if (d->m_listModelInterface) { - data->setValue(propId, d->m_listModelInterface->data(idx, QList<int>() << role).value(role)); + data->setValue(propId, d->m_listModelInterface->data(idx, role)); } else if (d->m_abstractItemModel) { QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root); data->setValue(propId, d->m_abstractItemModel->data(index, role)); |