qt5base-lts/tests/auto/widgets
Ivan Solovev 662184ac68 QComboBox: emit currentIndexChanged() and currentTextChanged() when the model is cleared
QComboBox uses QPersistentModelIndex to store the current index of the
underlying model. When the model is cleared, that index is automatically
invalidated, so calling QComboBoxPrivate::setCurrentIndex(QModelIndex())
does not result in signals being emitted, because we do not detect the
index change.

This patch uses indexBeforeChange to detect such situation and emit all
necessary signals.

Fixes: QTBUG-103007
Pick-to: 6.4 6.3 6.2
Change-Id: I29326830a30a17900839e8d1737a08bd940081ea
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-06-16 19:29:36 +02:00
..
dialogs Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
effects Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
graphicsview unblacklist passing tests 2022 2022-05-18 23:59:19 +02:00
itemviews Fix memory leak in tst_qtreewidget 2022-05-18 10:58:05 +00:00
kernel Fix typos in docs and comments 2022-06-15 21:31:02 +02:00
styles Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
util Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
widgets QComboBox: emit currentIndexChanged() and currentTextChanged() when the model is cleared 2022-06-16 19:29:36 +02:00
CMakeLists.txt Begin port of qtbase to CMake 2018-11-01 11:48:46 +00:00