From e1b3ad7c831023c3e336414a16b69773adea4e26 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 3 Jul 2012 10:51:17 +1000 Subject: [PATCH] Fix some commented issues from the refactor merge. Change-Id: Ied56bdfc93162b7668be7b07841948b8b5968a70 Reviewed-by: Martin Jones --- src/quick/items/qquickcanvas.cpp | 7 ++----- src/quick/items/qquickitem.cpp | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp index 37c238f..a242ca1 100644 --- a/src/quick/items/qquickcanvas.cpp +++ b/src/quick/items/qquickcanvas.cpp @@ -537,10 +537,6 @@ Translates the data in \a touchEvent to this canvas. This method leaves the ite */ void QQuickCanvasPrivate::translateTouchEvent(QTouchEvent *touchEvent) { -// Q_Q(QQuickCanvas); - -// touchEvent->setWidget(q); // ### refactor... - QList touchPoints = touchEvent->touchPoints(); for (int i = 0; i < touchPoints.count(); ++i) { QTouchEvent::TouchPoint &touchPoint = touchPoints[i]; @@ -1055,10 +1051,11 @@ QQuickItem *QQuickCanvas::mouseGrabberItem() const bool QQuickCanvasPrivate::clearHover() { + Q_Q(QQuickCanvas); if (hoverItems.isEmpty()) return false; - QPointF pos = QGuiApplicationPrivate::lastCursorPosition;; // ### refactor: q->mapFromGlobal(QCursor::pos()); + QPointF pos = q->mapFromGlobal(QGuiApplicationPrivate::lastCursorPosition.toPoint()); bool accepted = false; foreach (QQuickItem* item, hoverItems) diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index b83328a..df557f1 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -5014,7 +5014,7 @@ bool QQuickItem::isUnderMouse() const return false; QPointF cursorPos = QGuiApplicationPrivate::lastCursorPosition; - return contains(mapFromScene(cursorPos)); // ### refactor: d->canvas->mapFromGlobal(cursorPos)))) + return contains(mapFromScene(d->canvas->mapFromGlobal(cursorPos.toPoint()))); } bool QQuickItem::acceptHoverEvents() const -- 2.7.4