summaryrefslogtreecommitdiffstats
path: root/tests/auto/q3progressbar
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2011-04-29 08:41:00 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2011-04-29 08:41:00 (GMT)
commit849ebd5eceed33b6abc72aef3085afefc8d927ba (patch)
tree7d9deeb68cb66a506172ad6b9e0b8bc9d4ebc9d6 /tests/auto/q3progressbar
parentb198fa1cd226df11fbcae28021922e15e745ed1e (diff)
downloadQt-849ebd5eceed33b6abc72aef3085afefc8d927ba.zip
Qt-849ebd5eceed33b6abc72aef3085afefc8d927ba.tar.gz
Qt-849ebd5eceed33b6abc72aef3085afefc8d927ba.tar.bz2
Fix tst_Q3ProgressBar::setProgress, again
Reviewed-by: Jan-Arve
Diffstat (limited to 'tests/auto/q3progressbar')
-rw-r--r--tests/auto/q3progressbar/tst_q3progressbar.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/q3progressbar/tst_q3progressbar.cpp b/tests/auto/q3progressbar/tst_q3progressbar.cpp
index 23f3405..3a0c3e2 100644
--- a/tests/auto/q3progressbar/tst_q3progressbar.cpp
+++ b/tests/auto/q3progressbar/tst_q3progressbar.cpp
@@ -45,6 +45,7 @@
#include <qapplication.h>
#include <qdebug.h>
#include <q3progressbar.h>
+#include "../../shared/util.h"
//TESTED_CLASS=
//TESTED_FILES=
@@ -114,10 +115,9 @@ void tst_Q3ProgressBar::setProgress()
m_progressBar->paintNumber = 0;
m_progressBar->setProgress(m_progressBar->progress() + 1);
QCOMPARE(oldValue + 1,m_progressBar->progress());
- QApplication::processEvents();
// It might be > 1 because it is animated.
- QVERIFY(m_progressBar->paintNumber >= 1);
+ QTRY_VERIFY(m_progressBar->paintNumber >= 1);
qDebug() << "Animation test: paintNumber =" << m_progressBar->paintNumber;
//standard case
@@ -125,10 +125,9 @@ void tst_Q3ProgressBar::setProgress()
m_progressBar->setProgress(0);
m_progressBar->paintNumber = 0;
m_progressBar->setProgress(m_progressBar->progress() + 1);
- QApplication::processEvents();
// It might be > 1 because other events might cause painting.
- QVERIFY(m_progressBar->paintNumber >= 1);
+ QTRY_VERIFY(m_progressBar->paintNumber >= 1);
qDebug() << "Standard test: paintNumber =" << m_progressBar->paintNumber;
}