summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-13 21:00:21 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-14 06:38:43 +0200
commit1c76aa077e9c9d74fa2314752948896f9da381ee (patch)
treeef979f532d759c9ae061c400415afd974d3edd26 /tests/benchmarks
parent772a10391eead51e2c7c9b50473ef0f8096cef82 (diff)
Get rid of all usage of QApplication:desktop
Use QScreen APIs instead. Change-Id: Ie99af94fe4292223dbb165b3f5c1b74e8fe0498b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 54bc3a0115..7be7f3f90d 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -68,11 +68,11 @@ public:
void tryResize(int width, int height)
{
- QWidget *desktop = QApplication::desktop();
- if (desktop->width() < width)
- width = desktop->width();
- if (desktop->height() < height)
- height = desktop->height();
+ const QSize desktopSize = QGuiApplication::primaryScreen()->size();
+ if (desktopSize.width() < width)
+ width = desktopSize.width();
+ if (desktopSize.height() < height)
+ height = desktopSize.height();
if (size() != QSize(width, height)) {
resize(width, height);
QTest::qWait(250);