diff options
Diffstat (limited to 'tests/auto/qitemdelegate/tst_qitemdelegate.cpp')
-rw-r--r-- | tests/auto/qitemdelegate/tst_qitemdelegate.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp index 1ef77c0..9871da3 100644 --- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp @@ -63,6 +63,8 @@ #include <QPlainTextEdit> #include <QDialog> +#include "../../shared/util.h" + Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) //TESTED_CLASS= @@ -862,6 +864,8 @@ void tst_QItemDelegate::decoration() #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&table); #endif + QApplication::setActiveWindow(&table); + QTRY_COMPARE(QApplication::activeWindow(), &table); QVariant value; switch ((QVariant::Type)type) { @@ -1164,10 +1168,7 @@ void tst_QItemDelegate::task257859_finalizeEdit() QDialog dialog; QTimer::singleShot(100, &dialog, SLOT(close())); dialog.exec(); - - QTest::qWait(100); - - QVERIFY(!editor); + QTRY_VERIFY(!editor); } |