summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-22 10:40:41 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-22 10:45:50 (GMT)
commit561f2a3bf1ec74df87c3cd7c2641d34ce321c842 (patch)
tree4258c91c2e1937943261a0401407303bcfecfaf7 /tests/benchmarks
parent0a1e2e645bc1952c89d6ef560eccbe68e51f6ca8 (diff)
downloadQt-561f2a3bf1ec74df87c3cd7c2641d34ce321c842.zip
Qt-561f2a3bf1ec74df87c3cd7c2641d34ce321c842.tar.gz
Qt-561f2a3bf1ec74df87c3cd7c2641d34ce321c842.tar.bz2
Stabilize style sheet benchmarks.
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
index 226b661..d051b12 100644
--- a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
+++ b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
@@ -82,6 +82,7 @@ void tst_qstylesheetstyle::empty()
{
QWidget *w = buildSimpleWidgets();
w->setStyleSheet("/* */");
+ QApplication::processEvents();
int i = 0;
QBENCHMARK {
w->setStyleSheet("/*" + QString::number(i) + "*/");
@@ -94,6 +95,7 @@ void tst_qstylesheetstyle::empty_events()
{
QWidget *w = buildSimpleWidgets();
w->setStyleSheet("/* */");
+ QApplication::processEvents();
int i = 0;
QBENCHMARK {
w->setStyleSheet("/*" + QString::number(i) + "*/");
@@ -112,6 +114,7 @@ void tst_qstylesheetstyle::simple()
{
QWidget *w = buildSimpleWidgets();
w->setStyleSheet("/* */");
+ QApplication::processEvents();
int i = 0;
QBENCHMARK {
w->setStyleSheet(QString(simple_css) + "/*" + QString::number(i) + "*/");
@@ -124,6 +127,7 @@ void tst_qstylesheetstyle::simple_events()
{
QWidget *w = buildSimpleWidgets();
w->setStyleSheet("/* */");
+ QApplication::processEvents();
int i = 0;
QBENCHMARK {
w->setStyleSheet(QString(simple_css) + "/*" + QString::number(i) + "*/");
@@ -175,8 +179,13 @@ void tst_qstylesheetstyle::grid()
w->setStyleSheet("/* */");
if(show) {
w->show();
+ QTest::qWaitForWindowShown(w);
+ QApplication::flush();
+ QApplication::processEvents();
QTest::qWait(30);
+ QApplication::processEvents();
}
+ QApplication::processEvents();
int i = 0;
QBENCHMARK {
w->setStyleSheet(stylesheet + "/*" + QString::number(i) + "*/");