diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index d110a01..5502187 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -3436,6 +3436,7 @@ void QQuickItem::wheelEvent(QWheelEvent *event) */ void QQuickItem::touchEvent(QTouchEvent *event) { + qDebug() << __FUNCTION__ << event; event->ignore(); } @@ -4328,6 +4329,7 @@ void QQuickItemPrivate::deliverFocusEvent(QFocusEvent *e) void QQuickItemPrivate::deliverMouseEvent(QMouseEvent *e) { + qDebug() << __FUNCTION__ << e; Q_Q(QQuickItem); Q_ASSERT(e->isAccepted()); diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 176f46e..83cb96e 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -472,6 +472,7 @@ bool QQuickWindowPrivate::checkIfDoubleClicked(ulong newPressEventTimestamp) bool QQuickWindowPrivate::translateTouchToMouse(QQuickItem *item, QTouchEvent *event) { + qDebug() << __FUNCTION__; Q_Q(QQuickWindow); // For each point, check if it is accepted, if not, try the next point. // Any of the fingers can become the mouse one. @@ -1544,6 +1545,7 @@ bool QQuickWindowPrivate::deliverTouchCancelEvent(QTouchEvent *event) // call deliverTouchPoints to actually dispatch the points bool QQuickWindowPrivate::deliverTouchEvent(QTouchEvent *event) { + qDebug() << __FUNCTION__ << event; #ifdef TOUCH_DEBUG if (event->type() == QEvent::TouchBegin) qWarning() << "touchBeginEvent"; @@ -1607,6 +1609,7 @@ bool QQuickWindowPrivate::deliverTouchEvent(QTouchEvent *event) // This function recurses and sends the events to the individual items bool QQuickWindowPrivate::deliverTouchPoints(QQuickItem *item, QTouchEvent *event, const QList &newPoints, QSet *acceptedNewPoints, QHash > *updatedPoints) { + qDebug() << __FUNCTION__ << event << updatedPoints->size(); QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); if (itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape) { @@ -1685,6 +1688,7 @@ bool QQuickWindowPrivate::deliverTouchPoints(QQuickItem *item, QTouchEvent *even // They are all pre-transformed, too. bool QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, QTouchEvent *event, QSet *acceptedNewPoints, const QSet &matchingNewPoints, const QList &matchingPoints) { + qDebug() << __FUNCTION__ << item << matchingPoints.size(); QScopedPointer touchEvent(touchEventWithPoints(*event, matchingPoints)); touchEvent.data()->setTarget(item); bool touchEventAccepted = false; @@ -1704,6 +1708,7 @@ bool QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, QTouchEv QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); itemPrivate->deliverTouchEvent(touchEvent.data()); touchEventAccepted = touchEvent->isAccepted(); + qDebug() << __FUNCTION__ << "delivered to " << itemPrivate << touchEventAccepted; // If the touch event wasn't accepted, synthesize a mouse event and see if the item wants it. if (!touchEventAccepted && (itemPrivate->acceptedMouseButtons() & Qt::LeftButton)) { @@ -1727,6 +1732,7 @@ bool QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, QTouchEv itemForTouchPointId.remove(id); } + qDebug() << __FUNCTION__ << "returns " << touchEventAccepted; return touchEventAccepted; } @@ -2010,6 +2016,7 @@ bool QQuickWindowPrivate::sendFilteredTouchEvent(QQuickItem *target, QQuickItem bool QQuickWindowPrivate::sendFilteredMouseEvent(QQuickItem *target, QQuickItem *item, QEvent *event) { + qDebug() << __FUNCTION__ << target; if (!target) return false;