summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-06-02 16:42:54 +0200
committerMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-06-09 15:20:51 +0000
commit5964294506514f06cc6b5355b5c575a956d60a38 (patch)
tree3a2cb794a24a2fafc8bad46eaa48319c13dc11d2
parent0963be63ce741ef6c7585358c3f3b1cb806b66e8 (diff)
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 <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp4
1 files 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();