summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsettings/tst_qsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qsettings/tst_qsettings.cpp')
-rw-r--r--tests/auto/qsettings/tst_qsettings.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/auto/qsettings/tst_qsettings.cpp b/tests/auto/qsettings/tst_qsettings.cpp
index 0395eff..0813e28 100644
--- a/tests/auto/qsettings/tst_qsettings.cpp
+++ b/tests/auto/qsettings/tst_qsettings.cpp
@@ -51,6 +51,7 @@
#include <QtCore/QMetaType>
#include <QtCore/QtDebug>
#include <QtCore/QString>
+#include "../../shared/util.h"
#if !defined(Q_OS_SYMBIAN)
# include <cctype>
@@ -1726,26 +1727,22 @@ void tst_QSettings::testUpdateRequestEvent()
settings1.setValue("key1", 1);
QVERIFY(QFileInfo("foo").size() == 0);
- qApp->processEvents();
- QVERIFY(QFileInfo("foo").size() > 0);
+ QTRY_VERIFY(QFileInfo("foo").size() > 0);
settings1.remove("key1");
QVERIFY(QFileInfo("foo").size() > 0);
- qApp->processEvents();
- QVERIFY(QFileInfo("foo").size() == 0);
+ QTRY_VERIFY(QFileInfo("foo").size() == 0);
settings1.setValue("key2", 2);
QVERIFY(QFileInfo("foo").size() == 0);
- qApp->processEvents();
- QVERIFY(QFileInfo("foo").size() > 0);
+ QTRY_VERIFY(QFileInfo("foo").size() > 0);
settings1.clear();
QVERIFY(QFileInfo("foo").size() > 0);
- qApp->processEvents();
- QVERIFY(QFileInfo("foo").size() == 0);
+ QTRY_VERIFY(QFileInfo("foo").size() == 0);
}
const int NumIterations = 5;