Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.0.0
-
None
Description
In 6.0 QAbstractItemModel::multiData was introduced, and a few overrides provided for models coming with Qt.
This opens the door to a source incompatibility: in general, if a model overrides data() and multiData(), it should implement data() in terms of multiData(). (The other way around is pointless, as it's the default implementation of multiData). However, a subclass may further override data() to do something else. If that happens, data() and multiData() fall out of sync, and a view gets different results depending on whether it uses data() or multiData().
Ideally, if one goes the trouble of providing multiData, then it should provide data() as a final override. We can suggest this to users for their models.
What to do for the models in Qt, however? The major offender is QSIM/QSI, for which multiData overrides have been added, with data() pointing to them. If we want to leave them as-is, we'd need to make multiData() point at data() instead (they won't ever get the benefits of multiData. But after all, theyr'e convenience models)
Attachments
Issue Links
- relates to
-
QTBUG-89157 Binary/Source incompatible changes to consider within Qt 6
- Open