diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2010-11-26 09:11:14 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2010-11-26 16:08:52 (GMT) |
commit | 5784daa662e1ace86e6046bf369e9029d57c32d8 (patch) | |
tree | 492dfaf2fc67fad369fa265d6fd9e43fe1780839 /tests/auto/qsettings | |
parent | b758e011a6d88448bf4c3db7f27cb4df773fd5e3 (diff) | |
download | Qt-5784daa662e1ace86e6046bf369e9029d57c32d8.zip Qt-5784daa662e1ace86e6046bf369e9029d57c32d8.tar.gz Qt-5784daa662e1ace86e6046bf369e9029d57c32d8.tar.bz2 |
Fix QSettings auto test to use QTRY_VERIFY
... instead of relying on qApp->processEvents.
Reviewed-by: Olivier Goffart
Diffstat (limited to 'tests/auto/qsettings')
-rw-r--r-- | tests/auto/qsettings/tst_qsettings.cpp | 13 |
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; |