summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcursor.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-04-14 12:56:48 +0200
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-04-14 12:58:24 +0200
commit91fb8061875db830d26f95acef048e36fb44cd6a (patch)
tree3718dd47863a56390b0918b88c6a8ef74c7a84dd /src/gui/kernel/qcursor.cpp
parent7c77febbde4a7e2ebe73579f06baf018cbd192c3 (diff)
Move qHighDpi functions into the QHighDpi namespace
...and use fromDevicePixels instead of toDeviceIndependentPixels
Diffstat (limited to 'src/gui/kernel/qcursor.cpp')
-rw-r--r--src/gui/kernel/qcursor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp
index 547c32b2b4..dc1b6dca76 100644
--- a/src/gui/kernel/qcursor.cpp
+++ b/src/gui/kernel/qcursor.cpp
@@ -180,7 +180,7 @@ QPoint QCursor::pos(const QScreen *screen)
{
if (screen)
if (const QPlatformCursor *cursor = screen->handle()->cursor())
- return qHighDpiToDeviceIndependentPixels(cursor->pos());
+ return QHighDpi::fromDevicePixels(cursor->pos());
return QGuiApplicationPrivate::lastCursorPosition.toPoint();
}
@@ -232,7 +232,7 @@ void QCursor::setPos(QScreen *screen, int x, int y)
{
if (screen) {
if (QPlatformCursor *cursor = screen->handle()->cursor()) {
- const QPoint devicePos = qHighDpiToDevicePixels(QPoint(x, y));
+ const QPoint devicePos = QHighDpi::toDevicePixels(QPoint(x, y));
// Need to check, since some X servers generate null mouse move
// events, causing looping in applications which call setPos() on
// every mouse move event.