diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-11-26 14:53:50 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-11-27 11:29:30 +0200 |
commit | 7c942cc0f497fe7e61ce6a10fce45771c0858e09 (patch) | |
tree | aab5d2285b8e583f3565e305e0818a49503cf95c /src/datavisualization/data/scatteritemmodelhandler.cpp | |
parent | e029d0ea1d486dd3dbbfa4519a2125da202f22e4 (diff) |
Integrated item model mappings to item model proxies
Separate mapping object was redundant.
Task-number: QTRD-2564
Change-Id: I6b1a23ba52dbb184f46df0fdd64184eeb145c0c3
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'src/datavisualization/data/scatteritemmodelhandler.cpp')
-rw-r--r-- | src/datavisualization/data/scatteritemmodelhandler.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/datavisualization/data/scatteritemmodelhandler.cpp b/src/datavisualization/data/scatteritemmodelhandler.cpp index 34230ae0..a70b35b0 100644 --- a/src/datavisualization/data/scatteritemmodelhandler.cpp +++ b/src/datavisualization/data/scatteritemmodelhandler.cpp @@ -35,8 +35,7 @@ ScatterItemModelHandler::~ScatterItemModelHandler() // Resolve entire item model into QScatterDataArray. void ScatterItemModelHandler::resolveModel() { - QItemModelScatterDataMapping *mapping = static_cast<QItemModelScatterDataMapping *>(m_activeMapping); - if (m_itemModel.isNull() || !mapping) { + if (m_itemModel.isNull()) { m_proxy->resetArray(0); m_proxyArray = 0; return; @@ -45,9 +44,9 @@ void ScatterItemModelHandler::resolveModel() static const int noRoleIndex = -1; QHash<int, QByteArray> roleHash = m_itemModel->roleNames(); - const int xPosRole = roleHash.key(mapping->xPosRole().toLatin1(), noRoleIndex); - const int yPosRole = roleHash.key(mapping->yPosRole().toLatin1(), noRoleIndex); - const int zPosRole = roleHash.key(mapping->zPosRole().toLatin1(), noRoleIndex); + const int xPosRole = roleHash.key(m_proxy->xPosRole().toLatin1(), noRoleIndex); + const int yPosRole = roleHash.key(m_proxy->yPosRole().toLatin1(), noRoleIndex); + const int zPosRole = roleHash.key(m_proxy->zPosRole().toLatin1(), noRoleIndex); const int columnCount = m_itemModel->columnCount(); const int rowCount = m_itemModel->rowCount(); const int totalCount = rowCount * columnCount; |