Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.1
-
None
-
-
66acca3316e3c333e4cc3abfc343e58e3516c8b4 (qt/qtbase/dev) 61281b928bf5f2d228fb810af38bba71032f63a6 (qt/qtbase/5.15)
Description
if a QSortFilterModel implements filterAcceptsColumns and the source model emits datachanged with either topLeft or bottomRight on a column which is not accepted, QSortFilterModel will forward the datachanged signal with topLeft and/or bottomRight as an invalid QModelIndex(), making a spurious signal, either wil both useless parameters or with one of the two invalid, making impossible to actually know where the change of data started or ended.
This is kinda similar but not completely the same as this old Qt bug (as this one was about headerDataChanged) https://bugreports.qt.io/browse/QTBUG-26515
attached a test case which will print a warning when such signal is emitted by the QSortfilterProxyModel