Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.x, 5.3.2, 5.4.0
-
None
-
940530ab67a8fd59130b2299fe854707207f041f
Description
In the QComboBox::setModel method, the root model index (d->root) can be invalid. Not invalid according to the isValid() method. Not invalid due to some changes inside the model since it is a QPersistentModelIndex. But invalid, because the model and the index aren't even semantically linked.
If someone creates a QComboBox, attach a model to it with setModel, change the root model index with setRootModelIndex and later update the model with setModel, the root index can mismatch this new model. I guess the expected behaviour is to reinitialize the root index every time the model is updated.
Attachments
For Gerrit Dashboard: QTBUG-43350 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
102393,3 | QComboBox: make setModel reset the root model index | dev | qt/qtbase | Status: MERGED | +2 | 0 |