Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
4.8.0
-
None
-
All.
Description
Hi,
With reference to the minimal sourcecode in the attachment:
When having a QSortFilterProxyModel (FirstSorter) as source
model to another QSortFilterProxyModel (SecondSorter), if
the source model of the the first level QSortFilterProxyModel
(FirstSorter) emits headerDataChanged, the first level sorter
does not verify the column/row prior to re-emitting the signal.
This causes the code in the next level of headerDataChanged
to assert due to -1 being used in the call to <at>.
ASSERT failure in QVector<T>::at: "index out of range", file ..\..\include/QtCore/../../src/corelib/tools/qvector.h, line 339
This behaviour is inconsistent with how dataChanged is handled
and seems incorrect, as ignoring the fact that the column is
filtered negates the purpose of QSortFilterProxyModel.
Kind regards,
Werner