From a0d948ca915f932857ecbb711dad60a78fdb1f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 16 Feb 2010 15:55:29 +0100 Subject: 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. --- .../functional/GraphicsViewBenchmark/main.cpp | 17 +++++++++++++---- 1 file 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 #include #include +#include #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(); -- cgit v0.12