From 80c7ce5e0c990fb67f90563fb81b16e33699a522 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 1 Aug 2016 15:17:52 +0200 Subject: add QQuickPointerEvent::setAccepted/isAccepted to avoid mouse/touch casting This makes deliverMouseEvent() slightly more generic: the only place we now care about it being a mouse event is to be able to call sendEvent() with the original event. Change-Id: Ibd1660bb45b6f8b3a5b9926aeb3dc85ff2e41d0f Reviewed-by: Frederik Gladhorn --- src/quick/items/qquickevents_p_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/quick/items/qquickevents_p_p.h') diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h index 072a90d864..b28c68c090 100644 --- a/src/quick/items/qquickevents_p_p.h +++ b/src/quick/items/qquickevents_p_p.h @@ -362,6 +362,8 @@ public: // helpers for C++ only (during event delivery) virtual const QQuickPointerTabletEvent *asPointerTabletEvent() const { return nullptr; } bool isValid() const { return m_event != nullptr; } virtual bool allPointsAccepted() const = 0; + bool isAccepted() { return m_event->isAccepted(); } + void setAccepted(bool accepted) { m_event->setAccepted(accepted); } QVector unacceptedPointScenePositions() const; QVector unacceptedPressedPointScenePositions() const; -- cgit v1.2.3