Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.1
-
None
-
Linux 64bit
-
7b96944a02991e404cdab61e24182b90f5849120
Description
If QSortFilterProxyModel is used to sort items in some cases the sorting may not work.
If on "startup" all items are hidden with filterAcceptsRow and we are sorting the list using dynamicSortFilter (lessThan) then when some items become available again the sort will not work because lessThan isn't called. The problem is that update_source_sort_column() in QSortFilterProxyModel isn't called when one or more items become visible so the source_sort_column is -1 in QSortFilterProxyModelPrivate::_q_sourceDataChanged.
I've attached test program, the items are shown after 5 seconds and should be sorted but aren't, if I set mVisible to true in TreeModel then all is ok.