Blacklist tst_QItemDelegate::comboBox on openSUSE

This failed (occasionally) in finding the editor widget, so wait for the window
to be shown properly. Also enter the event loop with QTRY_VERIFY and not for a
fixed time of 1 s.

This however just moved the point of failure. Now the test fails since the
clearing and setting of focus does not dismiss the editor widget sometimes, so
still blacklist it.

Task-number: QTBUG-67282
Task-number: QTBUG-66216
Change-Id: Iec598609fce23a25d7b955082d0973685d612715
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This commit is contained in:
Kari Oikarinen 2018-03-23 17:58:45 +02:00
parent b096982899
commit a88063008d
2 changed files with 6 additions and 4 deletions

View File

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

View File

@ -1389,13 +1389,12 @@ void tst_QItemDelegate::comboBox()
QTableWidget widget(1, 1);
widget.setItem(0, 0, item1);
widget.show();
QVERIFY(QTest::qWaitForWindowExposed(&widget));
widget.editItem(item1);
QTestEventLoop::instance().enterLoop(1);
QComboBox *boolEditor = widget.viewport()->findChild<QComboBox*>();
QVERIFY(boolEditor);
QComboBox *boolEditor = nullptr;
QTRY_VERIFY( (boolEditor = widget.viewport()->findChild<QComboBox*>()) );
QCOMPARE(boolEditor->currentIndex(), 1); // True is selected initially.
// The data must actually be different in order for the model
// to be updated.