diff options
author | Stephen Kelly <stephen@kdab.com> | 2010-02-25 10:22:18 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2010-02-25 10:34:32 (GMT) |
commit | 72f3752b5b517c14e64c4e15d354ddf32e386c20 (patch) | |
tree | 2ff3ce739a18dd09432a7b79a8b39e4f9ec12616 /src/gui/itemviews | |
parent | bb61a01001899e23ae12d2edd91a86807dba848a (diff) | |
download | Qt-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.cpp | 1 |
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(); } /*! |