Priority: P2: Important
Affects Version/s: 5.14.1
Fix Version/s: 5.15.1
Component/s: Quick: Controls 2
Commits:3adeceaa1cfe5fae55ca6bd75226c52363a7e7d3 (qt/qtquickcontrols2/dev) bf9397c535971ec38668200ab465ebf20fa55ccf (qt/qtquickcontrols2/5.15)
When the model of a ComboBox is changed, in the setModel function (line 896 in qquickcombobox.cpp) the currentIndex is set to 0 if there are elements in the model and the currentText is updated (lines 919 & 920).
The currentText is correctly updated, it uses currentIndex to retrieve the text from the model.
But the update of the currentValue is done in setCurrentIndex, which is never done if the currentIndex does not change (return at line 579).
So in the end we have the correct model, the correct text and the correct index but a wrong currentValue.
I guess that what's done to update the currentText in setModel() should be also done for the currentValue.
|For Gerrit Dashboard: QTBUG-83554|
|299915,2||ComboBox: fix currentValue not being updated on model changes||5.15||qt/qtquickcontrols2||Status: MERGED||+2||0|
|299961,4||ComboBox: fix currentValue not being updated on model changes||dev||qt/qtquickcontrols2||Status: MERGED||+2||0|