tst_QItemDelegate: try to stabilize combobox test

tst_QItemDelegate::comboBox() is flaky because sometimes the used
QTableWidget does not yet have the focus which prevents a correct
editing. Fix it by explictily setting the focus on the widget after it
is shown.
A similar fix was added for dateTimeEditor() in
9822d57d85.
With this patch the test no longer fails for my on opensuse, therefore
remove the blacklisting.

Task-number: QTBUG-67282
Change-Id: I907db662ca347f8e8d31e5be215a100377b159ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
This commit is contained in:
Christian Ehrlicher 2019-01-20 14:29:54 +01:00
parent 4c46e3189a
commit 75335b71c9
2 changed files with 1 additions and 4 deletions

View File

@ -2,7 +2,3 @@
opensuse-42.3 ci
[testLineEditValidation]
opensuse-42.3 ci
[comboBox]
# QTBUG-67282
opensuse
opensuse-leap

View File

@ -1400,6 +1400,7 @@ void tst_QItemDelegate::comboBox()
widget.setItem(0, 0, item1);
widget.show();
QVERIFY(QTest::qWaitForWindowExposed(&widget));
QApplication::setActiveWindow(&widget);
widget.editItem(item1);