summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-06 08:47:00 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-06 08:49:04 (GMT)
commitede24aab6793fc524a4660a8d092309a82a5ccff (patch)
treea8c19932b7848594ef5541924ccd0fb4d9e0ccbe /tests
parent886656afe0bd1101efbb0054c64f57326bb0a2ee (diff)
downloadQt-ede24aab6793fc524a4660a8d092309a82a5ccff.zip
Qt-ede24aab6793fc524a4660a8d092309a82a5ccff.tar.gz
Qt-ede24aab6793fc524a4660a8d092309a82a5ccff.tar.bz2
Q3ProgressBar autotest fixed on mac
- We need to process events in order to leave time to mac to update the widget. - When in undefined case, the progressbar is animated, so the number of paintevents might be bigger than 1.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/q3progressbar/tst_q3progressbar.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/q3progressbar/tst_q3progressbar.cpp b/tests/auto/q3progressbar/tst_q3progressbar.cpp
index 0378d15..549c8a4 100644
--- a/tests/auto/q3progressbar/tst_q3progressbar.cpp
+++ b/tests/auto/q3progressbar/tst_q3progressbar.cpp
@@ -102,7 +102,7 @@ void tst_Q3ProgressBar::setProgress()
{
MyCustomProgressBar * m_progressBar = new MyCustomProgressBar();
m_progressBar->show();
- QTest::qWait(500);
+ QApplication::processEvents();
//case with total steps = 0
m_progressBar->setTotalSteps(0);
@@ -110,15 +110,16 @@ void tst_Q3ProgressBar::setProgress()
m_progressBar->paintNumber = 0;
m_progressBar->setProgress(m_progressBar->progress() + 1);
QCOMPARE(oldValue + 1,m_progressBar->progress());
- QCOMPARE(m_progressBar->paintNumber,1);
+ QApplication::processEvents();
+ QVERIFY(m_progressBar->paintNumber >= 1); //it might be more than 1 because it is animated
//standard case
m_progressBar->setTotalSteps(3);
m_progressBar->setProgress(0);
m_progressBar->paintNumber = 0;
m_progressBar->setProgress(m_progressBar->progress() + 1);
+ QApplication::processEvents();
QCOMPARE(m_progressBar->paintNumber,1);
-
}
QTEST_MAIN(tst_Q3ProgressBar)