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
Attachments
For Gerrit Dashboard: QTBUG-86850 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
317447,21 | Fix invalid QSortFilterProxyModel::dataChanged parameters | dev | qt/qtbase | Status: MERGED | +2 | 0 |
324152,2 | Fix invalid QSortFilterProxyModel::dataChanged parameters | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |