diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2010-09-22 12:46:55 +0200 |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-09-28 16:04:15 +0200 |
commit | 893cd4dd6eb649ee00f0b5dad95c97a80d6a0d43 (patch) | |
tree | ddf31523f3f95a9a1f3f50ff3637dc6fc8b7235d /src/gui | |
parent | 2fab427e4c30a81ea73b8fa1a3f6fee9706caad0 (diff) |
An an assert when a QModelIndex from the wrong model is used with QSFPM.
Merge-request: 818
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemviews/qsortfilterproxymodel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index dc8d93814f..fe866e57ab 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -362,6 +362,7 @@ QModelIndex QSortFilterProxyModelPrivate::proxy_to_source(const QModelIndex &pro return QModelIndex(); // for now; we may want to be able to set a root index later if (proxy_index.model() != q_func()) { qWarning() << "QSortFilterProxyModel: index from wrong model passed to mapToSource"; + Q_ASSERT(!"QSortFilterProxyModel: index from wrong model passed to mapToSource"); return QModelIndex(); } IndexMap::const_iterator it = index_to_iterator(proxy_index); @@ -379,6 +380,7 @@ QModelIndex QSortFilterProxyModelPrivate::source_to_proxy(const QModelIndex &sou return QModelIndex(); // for now; we may want to be able to set a root index later if (source_index.model() != model) { qWarning() << "QSortFilterProxyModel: index from wrong model passed to mapFromSource"; + Q_ASSERT(!"QSortFilterProxyModel: index from wrong model passed to mapFromSource"); return QModelIndex(); } QModelIndex source_parent = source_index.parent(); |