diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2010-09-16 09:31:19 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2010-09-16 09:34:17 (GMT) |
commit | 6f716cbdc8a054d2bedc0ffa2bb3a48c12e24695 (patch) | |
tree | cd38cb450ba2bbd285dfbafd7d690a050d370666 /tests/auto/qsettings | |
parent | 6437e4083bf088a3a67660d7b015de8647557609 (diff) | |
download | Qt-6f716cbdc8a054d2bedc0ffa2bb3a48c12e24695.zip Qt-6f716cbdc8a054d2bedc0ffa2bb3a48c12e24695.tar.gz Qt-6f716cbdc8a054d2bedc0ffa2bb3a48c12e24695.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 058a750..48c5fd1 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> @@ -1719,26 +1720,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; |