summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Krause <volker.krause@kdab.com>2013-05-04 16:26:25 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-06 20:24:04 (GMT)
commitbb00ac8d1251be3e703cc09e5fb2f100f24b398b (patch)
tree170de83ede70b06b9df300412231cf18f47e2857 /src
parent66ebc3e079d71a22e6fef5550fa2b00ff4a9cbe9 (diff)
downloadQt-bb00ac8d1251be3e703cc09e5fb2f100f24b398b.zip
Qt-bb00ac8d1251be3e703cc09e5fb2f100f24b398b.tar.gz
Qt-bb00ac8d1251be3e703cc09e5fb2f100f24b398b.tar.bz2
Don't bypass overwritten [set]data() methods in the proxy.
By calling itemData() of the source model directly, the result cannot contain data provided by the proxy model itself. The base class implementation however will call data() on the proxy instead. Cherry-picked from qtbase/96e3c2bcbfedc8b5cb8fc099229a02a1fa335c21. Change-Id: I7e8b65ab045382089c577d9832edc1555b71419e Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/itemviews/qabstractproxymodel.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/itemviews/qabstractproxymodel.cpp b/src/gui/itemviews/qabstractproxymodel.cpp
index 7acc0bd..2143a8f 100644
--- a/src/gui/itemviews/qabstractproxymodel.cpp
+++ b/src/gui/itemviews/qabstractproxymodel.cpp
@@ -248,8 +248,7 @@ QVariant QAbstractProxyModel::headerData(int section, Qt::Orientation orientatio
*/
QMap<int, QVariant> QAbstractProxyModel::itemData(const QModelIndex &proxyIndex) const
{
- Q_D(const QAbstractProxyModel);
- return d->model->itemData(mapToSource(proxyIndex));
+ return QAbstractItemModel::itemData(proxyIndex);
}
/*!
@@ -275,8 +274,7 @@ bool QAbstractProxyModel::setData(const QModelIndex &index, const QVariant &valu
*/
bool QAbstractProxyModel::setItemData(const QModelIndex &index, const QMap< int, QVariant >& roles)
{
- Q_D(QAbstractProxyModel);
- return d->model->setItemData(mapToSource(index), roles);
+ return QAbstractItemModel::setItemData(index, roles);
}
/*!