qt5base-lts/tests/auto/corelib/itemmodels
Nils Jeisecke 6894bc0f3f Fix sorted QSortFilterProxyModel filter update
When changing a filter so that a previously empty proxy model becomes
populated sorting was not applied correctly.

This was caused by using mapToSource for getting source_sort_column
from proxy_sort_column. For an empty proxy model this won't work because
no valid proxy index can be created in this case.

We now directly use the root index column mapping instead by doing
essentially the same as QSortFilterProxyModelPrivate::proxy_to_source
but without the sanity checks needed for external use.

The sorting feature of QSortFilterProxyModel has always assumed that
the number of columns is specified by columnCount(QModelIndex()) so
the behavior doesn't change.

[ChangeLog][QtCore][QSortFilterProxyModel] Fixed sorting when a
previously empty proxy model becomes populated because of a change in
the filter.

Task-number: QTBUG-30662
Change-Id: I21322122e127889dfadc02f838f0119ed322dcab
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-02-03 22:12:20 +01:00
..
qabstractitemmodel don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
qabstractproxymodel Merge remote-tracking branch 'origin/stable' into dev 2013-01-22 18:40:13 +01:00
qidentityproxymodel Don't bypass overwritten [set]data() methods in the proxy. 2013-04-08 14:17:27 +02:00
qitemmodel Fix minor typos in docs, printed messages & comments 2013-01-28 18:12:41 +01:00
qitemselectionmodel Make the QItemSelectionModel test widgets-independent. 2013-08-13 16:34:16 +02:00
qsortfilterproxymodel Fix sorted QSortFilterProxyModel filter update 2014-02-03 22:12:20 +01:00
qstringlistmodel Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
itemmodels.pro exclude gui-needing tests from -no-gui build 2013-10-18 20:05:27 +02:00