summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorStephen Kelly <stephen@kdab.com>2010-02-25 10:22:18 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-02-25 10:34:32 (GMT)
commit72f3752b5b517c14e64c4e15d354ddf32e386c20 (patch)
tree2ff3ce739a18dd09432a7b79a8b39e4f9ec12616 /src/gui/itemviews
parentbb61a01001899e23ae12d2edd91a86807dba848a (diff)
downloadQt-72f3752b5b517c14e64c4e15d354ddf32e386c20.zip
Qt-72f3752b5b517c14e64c4e15d354ddf32e386c20.tar.gz
Qt-72f3752b5b517c14e64c4e15d354ddf32e386c20.tar.bz2
Set the roleNames of proxy models to the roleNames of the source model.
This simplifies the use of model view with qml and proxies. Merge-request: 2315 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r--src/gui/itemviews/qabstractproxymodel.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/itemviews/qabstractproxymodel.cpp b/src/gui/itemviews/qabstractproxymodel.cpp
index 40345a7..43a1327 100644
--- a/src/gui/itemviews/qabstractproxymodel.cpp
+++ b/src/gui/itemviews/qabstractproxymodel.cpp
@@ -127,6 +127,7 @@ void QAbstractProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
} else {
d->model = QAbstractItemModelPrivate::staticEmptyModel();
}
+ d->roleNames = d->model->roleNames();
}
/*!