diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-09-21 06:25:48 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-09-21 07:09:12 (GMT) |
commit | 46e49547f8e4614cd504b0af0d52d4e2768b57c3 (patch) | |
tree | 6b03de15d71e0539edd4f9ff3314a0292298dab4 /src/declarative | |
parent | bf37d0708afbf4df8eb4ffcba60538a53083edaa (diff) | |
download | Qt-46e49547f8e4614cd504b0af0d52d4e2768b57c3.zip Qt-46e49547f8e4614cd504b0af0d52d4e2768b57c3.tar.gz Qt-46e49547f8e4614cd504b0af0d52d4e2768b57c3.tar.bz2 |
Fix a crash in QDeclarativeVisualDataModel
Task-number: QTBUG-13754
Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 7b48758..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) { } @@ -1202,11 +1202,11 @@ 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, role)); } else if (d->m_abstractItemModel) { |