qt5base-lts/tests/auto/widgets/itemviews/qdatawidgetmapper
Mark Brand 84787d82ee QComboBox: fix use in QDataWidgetMapper/QItemDelegate
QItemDelegate and QDataWidgetMapper use the WRITE method on the USER
property to set a value in a widget. This did not work for QComboBox
whose USER property currentText lacked a WRITE method.

This change adds the missing setter and flags it as the WRITE method.

The setter setCurrentText() simply calls setEditText() if the combo
box is editable. Otherwise, if there is a matching text in the list,
currentIndex is set to the corresponding index.

Test included.

Follow-up to 816c554017 which restored
currentText as the USER property.

Task-number: QTBUG-26501
Change-Id: I5f2f999e60b09728ca03ead4e28fe36d1f3ee189
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 15:24:00 +02:00
..
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
qdatawidgetmapper.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_qdatawidgetmapper.cpp QComboBox: fix use in QDataWidgetMapper/QItemDelegate 2012-10-26 15:24:00 +02:00