summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-17 15:43:04 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-18 15:13:49 (GMT)
commitf9a790fcac5222c89797e896ed14cd5b4ccd1fea (patch)
treea2446b9a0a849562a401668f381ac5dcb2919eda /tests/benchmarks
parentb77624c18896e149f338cb512369215b11bba685 (diff)
downloadQt-f9a790fcac5222c89797e896ed14cd5b4ccd1fea.zip
Qt-f9a790fcac5222c89797e896ed14cd5b4ccd1fea.tar.gz
Qt-f9a790fcac5222c89797e896ed14cd5b4ccd1fea.tar.bz2
Remove platform dependent code from QGraphicsView benchmark.
First, it doesn't make much sense to have platform specific code like this in a benchmark. Second, the Q_OS_SYMBIAN specific values makes more sense anyways, so we can use them on all platforms.
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp34
1 files changed, 1 insertions, 33 deletions
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 267fecc..235afef 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -170,11 +170,7 @@ void tst_QGraphicsView::paintSingleItem()
}
}
-#ifdef Q_OS_SYMBIAN
-# define DEEP_STACKING_COUNT 85
-#else
-# define DEEP_STACKING_COUNT 1000
-#endif
+#define DEEP_STACKING_COUNT 85
void tst_QGraphicsView::paintDeepStackingItems()
{
@@ -555,11 +551,7 @@ void tst_QGraphicsView::imageRiver()
QFile file(":/random.data");
QVERIFY(file.open(QIODevice::ReadOnly));
QDataStream str(&file);
-#if defined(Q_OS_SYMBIAN)
for (int i = 0; i < 50; ++i) {
-#else
- for (int i = 0; i < 100; ++i) {
-#endif
AnimatedPixmapItem *item = 0;
if (direction == 0) item = new AnimatedPixmapItem((i % 4) + 1, 0, rotation, scale);
if (direction == 1) item = new AnimatedPixmapItem(0, (i % 4) + 1, rotation, scale);
@@ -578,11 +570,7 @@ void tst_QGraphicsView::imageRiver()
#ifdef CALLGRIND_DEBUG
CALLGRIND_START_INSTRUMENTATION
#endif
-#if defined(Q_OS_SYMBIAN)
for (int i = 0; i < 50; ++i) {
-#else
- for (int i = 0; i < 100; ++i) {
-#endif
scene.advance();
while (view.count < (i+1))
qApp->processEvents();
@@ -677,11 +665,7 @@ void tst_QGraphicsView::textRiver()
QFile file(":/random.data");
QVERIFY(file.open(QIODevice::ReadOnly));
QDataStream str(&file);
-#if defined(Q_OS_SYMBIAN)
for (int i = 0; i < 50; ++i) {
-#else
- for (int i = 0; i < 100; ++i) {
-#endif
AnimatedTextItem *item = 0;
if (direction == 0) item = new AnimatedTextItem((i % 4) + 1, 0, rotation, scale);
if (direction == 1) item = new AnimatedTextItem(0, (i % 4) + 1, rotation, scale);
@@ -699,11 +683,7 @@ void tst_QGraphicsView::textRiver()
#ifdef CALLGRIND_DEBUG
CALLGRIND_START_INSTRUMENTATION
#endif
-#if defined(Q_OS_SYMBIAN)
for (int i = 0; i < 50; ++i) {
-#else
- for (int i = 0; i < 100; ++i) {
-#endif
scene.advance();
while (view.count < (i+1))
qApp->processEvents();
@@ -787,11 +767,7 @@ void tst_QGraphicsView::moveItemCache()
QFile file(":/random.data");
QVERIFY(file.open(QIODevice::ReadOnly));
QDataStream str(&file);
-#if defined(Q_OS_SYMBIAN)
for (int i = 0; i < 5; ++i) {
-#else
- for (int i = 0; i < 50; ++i) {
-#endif
AnimatedPixmapCacheItem *item = 0;
if (direction == 0) item = new AnimatedPixmapCacheItem((i % 4) + 1, 0);
if (direction == 1) item = new AnimatedPixmapCacheItem(0, (i % 4) + 1);
@@ -813,11 +789,7 @@ void tst_QGraphicsView::moveItemCache()
#ifdef CALLGRIND_DEBUG
CALLGRIND_START_INSTRUMENTATION
#endif
-#if defined(Q_OS_SYMBIAN)
for (int i = 0; i < 50; ++i) {
-#else
- for (int i = 0; i < 100; ++i) {
-#endif
scene.advance();
while (view.count < (i+1))
qApp->processEvents();
@@ -918,11 +890,7 @@ void tst_QGraphicsView::paintItemCache()
#ifdef CALLGRIND_DEBUG
CALLGRIND_START_INSTRUMENTATION
#endif
-#if defined(Q_OS_SYMBIAN)
for (int i = 0; i < 5; ++i) {
-#else
- for (int i = 0; i < 50; ++i) {
-#endif
scene.advance();
while (view.count < (i+1))
qApp->processEvents();