summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-09-01 11:13:35 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-09-01 13:27:37 +0200
commitc2aea75c220984953c53c3813717713437649999 (patch)
treee710906642169baf9213c047329d511e673bb98a /src/widgets/kernel/qwidget.cpp
parentcf5e669a06ec1d8bd08a4db9c2849c5d7ea9fec4 (diff)
Refactor QMouseEvent to contain the position inside the window
Rename the default accessors for positions to localPos, windowPos and screenPos, to be explicit about their use. Introduce a QT_NO_INTEGER_EVENT_COORDINATES define so one can make sure to always use the float based coordinates. Fixup all Qt code to use the correct constructor that specifies all three coordinates. Change-Id: If4bb93b8d1e2eb2440260d99680c468706cfe68f Reviewed-on: http://codereview.qt.nokia.com/4058 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 9587ac44e0..c1526d4f25 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -8713,8 +8713,9 @@ bool QWidget::event(QEvent *event)
break;
QMouseEvent mouseEvent(eventType,
- touchPoint.pos().toPoint(),
- touchPoint.screenPos().toPoint(),
+ touchPoint.pos(),
+ touchPoint.scenePos(),
+ touchPoint.screenPos(),
Qt::LeftButton,
Qt::LeftButton,
touchEvent->modifiers());