summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/gui/graphicsview
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-16 14:55:29 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-02-16 14:58:39 (GMT)
commita0d948ca915f932857ecbb711dad60a78fdb1f54 (patch)
tree6a0dd0be7b1048aede3907388a084b4caf38d10a /tests/benchmarks/gui/graphicsview
parent92b4997bdfcae098eac497fb9c279289831ad836 (diff)
downloadQt-a0d948ca915f932857ecbb711dad60a78fdb1f54.zip
Qt-a0d948ca915f932857ecbb711dad60a78fdb1f54.tar.gz
Qt-a0d948ca915f932857ecbb711dad60a78fdb1f54.tar.bz2
GraphicsViewBenchmark: Run app in full screen mode on small desktops.
We already run in fullscreen if Q_OS_SYMBIAN or Q_WS_MAEMO_5 is defined.
Diffstat (limited to 'tests/benchmarks/gui/graphicsview')
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
index e84b879..b904f40 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
@@ -43,6 +43,7 @@
#include <QtTest/QtTest>
#include <QtGui/qgraphicsview.h>
#include <QtGui/qpixmapcache.h>
+#include <QtGui/qdesktopwidget.h>
#include "mainview.h"
#include "dummydatagen.h"
@@ -324,8 +325,12 @@ void tst_GraphicsViewBenchmark::initTestCase()
#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
mMainView->showFullScreen();
#else
- mMainView->resize(360, 640);
- mMainView->show();
+ if (QApplication::desktop()->width() < 360 || QApplication::desktop()->height() < 640) {
+ mMainView->showFullScreen();
+ } else {
+ mMainView->resize(360, 640);
+ mMainView->show();
+ }
#endif
}
@@ -778,8 +783,12 @@ int main(int argc, char *argv[])
#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
view.showFullScreen();
#else
- view.resize(360, 640);
- view.show();
+ if (QApplication::desktop()->width() < 360 || QApplication::desktop()->height() < 640) {
+ view.showFullScreen();
+ } else {
+ view.resize(360, 640);
+ view.show();
+ }
#endif
}
returnValue = app.exec();