From c2aea75c220984953c53c3813717713437649999 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 1 Sep 2011 11:13:35 +0200 Subject: 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 Reviewed-by: Gunnar Sletta --- src/widgets/widgets/qwidgetlinecontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets/qwidgetlinecontrol.cpp') diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index 28c0973e04..790ed73f99 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -1412,7 +1412,7 @@ bool QWidgetLineControl::processEvent(QEvent* ev) case QEvent::GraphicsSceneMousePress:{ QGraphicsSceneMouseEvent *gvEv = static_cast(ev); QMouseEvent mouse(ev->type(), - gvEv->pos().toPoint(), gvEv->button(), gvEv->buttons(), gvEv->modifiers()); + gvEv->pos(), gvEv->pos(), gvEv->screenPos(), gvEv->button(), gvEv->buttons(), gvEv->modifiers()); processMouseEvent(&mouse); break; } #endif -- cgit v1.2.3