summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2010-09-21 06:25:48 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-09-23 03:21:28 (GMT)
commit6d524881d5f1125d7396b9a6e23ed65ce0a5c5eb (patch)
tree230cdcca517079a374e79088c069435f7410dec3 /src/declarative
parent28bd899cdcc7dd17be09feb20856b09af2639c0b (diff)
downloadQt-6d524881d5f1125d7396b9a6e23ed65ce0a5c5eb.zip
Qt-6d524881d5f1125d7396b9a6e23ed65ce0a5c5eb.tar.gz
Qt-6d524881d5f1125d7396b9a6e23ed65ce0a5c5eb.tar.bz2
Fix a crash in QDeclarativeVisualDataModel
Task-number: QTBUG-13754 Reviewed-by: Martin Jones (cherry picked from commit 46e49547f8e4614cd504b0af0d52d4e2768b57c3)
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index a70886e..01cd652 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, QList<int>() << role).value(role));
} else if (d->m_abstractItemModel) {