From 5964294506514f06cc6b5355b5c575a956d60a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 2 Jun 2015 16:42:54 +0200 Subject: Simplify tst_qwindow::positioning() platformScreenForWindow() is currently implemented as: return window->screen()->handle(); Use window.screen() directly and avoid the QHighDpi conversion call. Change-Id: I0f6487efc4d1494813179665b21150f3ca7a8666 Reviewed-by: Friedemann Kleint Reviewed-by: Paul Olav Tvete --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 9304d91b9a..0189d99227 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -333,8 +333,8 @@ void tst_QWindow::positioning() // if our positioning is actually fully respected by the window manager // test whether it correctly handles frame positioning as well if (originalPos == geometry.topLeft() && (originalMargins.top() != 0 || originalMargins.left() != 0)) { - const QPlatformScreen *pScreen = QPlatformScreen::platformScreenForWindow(&window); - const QRect availableGeometry = QHighDpi::fromNativeScreenGeometry(pScreen->availableGeometry(), pScreen->screen()); + const QScreen *screen = window.screen(); + const QRect availableGeometry = screen->availableGeometry(); const QPoint framePos = availableGeometry.center(); window.reset(); -- cgit v1.2.3