Stabilize QListWidget test
Shot in the dark, as usual. Change-Id: I272392e6d865f6b32047c3a0ebad70c0f007ba58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
f51cbc9e17
commit
509428decc
@ -317,13 +317,7 @@ void tst_QListWidget::closePersistentEditor()
|
||||
// actual test
|
||||
childCount = testWidget->viewport()->children().count();
|
||||
testWidget->closePersistentEditor(item);
|
||||
// Spin the event loop and hopefully it will die.
|
||||
QEventLoop eventLoop;
|
||||
for (int i=0; i < childCount; ++i)
|
||||
connect(testWidget->viewport()->children().at(i), SIGNAL(destroyed()), &eventLoop, SLOT(quit()));
|
||||
QTimer::singleShot(100, &eventLoop, SLOT(quit()));
|
||||
eventLoop.exec();
|
||||
QCOMPARE(testWidget->viewport()->children().count(), childCount - 1);
|
||||
QTRY_COMPARE(testWidget->viewport()->children().count(), childCount - 1);
|
||||
}
|
||||
|
||||
void tst_QListWidget::setItemHidden()
|
||||
|
Loading…
Reference in New Issue
Block a user