diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-20 14:29:54 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-25 14:47:17 +0000 |
commit | 75335b71c9d9355d93e3c731cb00765c357e3c63 (patch) | |
tree | 593a95233e3a4fa4ef6d84d5180a6e4feaa488df /tests/auto/widgets/itemviews | |
parent | 4c46e3189ac96c8ebcbe1caa47227c4e086d12ff (diff) |
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
9822d57d858068cfe5a07281ef069ef8c4c7b7b3.
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>
Diffstat (limited to 'tests/auto/widgets/itemviews')
-rw-r--r-- | tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST | 4 | ||||
-rw-r--r-- | tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST b/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST index c6aeebc8f8..fea108f3fd 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST +++ b/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST @@ -2,7 +2,3 @@ opensuse-42.3 ci [testLineEditValidation] opensuse-42.3 ci -[comboBox] -# QTBUG-67282 -opensuse -opensuse-leap diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp index 5a789a1aa2..aa11ed709f 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp @@ -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); |