diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-11-11 03:41:38 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-11-11 03:41:38 (GMT) |
commit | 1d228b5d532dc158d1c9ac3347168cdc11378779 (patch) | |
tree | 412e8577d9c414c13f88f2859e60a6d587ec9bbe | |
parent | 54ca4ebba8aa5c26516424a952f8e6d4ab919f6e (diff) | |
download | Qt-1d228b5d532dc158d1c9ac3347168cdc11378779.zip Qt-1d228b5d532dc158d1c9ac3347168cdc11378779.tar.gz Qt-1d228b5d532dc158d1c9ac3347168cdc11378779.tar.bz2 |
Performance fix
We weren't always taking advantage of the property cache for model
data when we should have been.
Reviewed-by: Martin Jones
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 1f01a45..9b5a072 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -557,8 +557,9 @@ QDeclarativeVisualDataModelData::~QDeclarativeVisualDataModelData() void QDeclarativeVisualDataModelData::ensureProperties() { QDeclarativeVisualDataModelPrivate *modelPriv = QDeclarativeVisualDataModelPrivate::get(m_model); - if (modelPriv->m_metaDataCacheable && !modelPriv->m_metaDataCreated) { - modelPriv->createMetaData(); + if (modelPriv->m_metaDataCacheable) { + if (!modelPriv->m_metaDataCreated) + modelPriv->createMetaData(); if (modelPriv->m_metaDataCreated) m_meta->setCached(true); } |