diff options
Diffstat (limited to 'src/quick/items')
-rw-r--r-- | src/quick/items/qquickflickable.cpp | 6 | ||||
-rw-r--r-- | src/quick/items/qquickflickable_p_p.h | 1 | ||||
-rw-r--r-- | src/quick/items/qquickitem.cpp | 1 | ||||
-rw-r--r-- | src/quick/items/qquickitem_p.h | 1 | ||||
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 6 |
5 files changed, 7 insertions, 8 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index bef766a516..9d6c51f37a 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -218,7 +218,7 @@ QQuickFlickablePrivate::QQuickFlickablePrivate() , hMoved(false), vMoved(false) , stealMouse(false), pressed(false) , scrollingPhase(false), interactive(true), calcVelocity(false) - , pixelAligned(false), replayingPressEvent(false) + , pixelAligned(false) , lastPosTime(-1) , lastPressTime(0) , deceleration(QML_FLICK_DEFAULTDECELERATION) @@ -2202,10 +2202,6 @@ bool QQuickFlickable::sendMouseEvent(QQuickItem *item, QMouseEvent *event) d->handleMouseMoveEvent(mouseEvent.data()); break; case QEvent::MouseButtonPress: - // Don't process a replayed event during replay - if (d->replayingPressEvent) - return false; - d->handleMousePressEvent(mouseEvent.data()); d->captureDelayedPress(item, event); stealThisEvent = d->stealMouse; // Update stealThisEvent in case changed by function call above diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h index 65bb3e802d..9d75533c8a 100644 --- a/src/quick/items/qquickflickable_p_p.h +++ b/src/quick/items/qquickflickable_p_p.h @@ -211,7 +211,6 @@ public: bool interactive : 1; bool calcVelocity : 1; bool pixelAligned : 1; - bool replayingPressEvent : 1; QElapsedTimer timer; qint64 lastPosTime; qint64 lastPressTime; diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index fdbd4c90a3..e646d59976 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -3077,6 +3077,7 @@ QQuickItemPrivate::QQuickItemPrivate() , implicitAntialiasing(false) , antialiasingValid(false) , isTabFence(false) + , replayingPressEvent(false) , dirtyAttributes(0) , nextDirtyItem(0) , prevDirtyItem(0) diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 6670975f20..9172f7eff1 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -433,6 +433,7 @@ public: // when any of the item's descendants gets focus, the item constrains the tab // focus chain and prevents tabbing outside. bool isTabFence:1; + bool replayingPressEvent:1; enum DirtyType { TransformOrigin = 0x00000001, diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 18ffcb3732..98d16709b7 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2449,9 +2449,11 @@ bool QQuickWindowPrivate::sendFilteredMouseEvent(QQuickItem *target, QQuickItem if (!target) return false; - bool filtered = false; - QQuickItemPrivate *targetPrivate = QQuickItemPrivate::get(target); + if (targetPrivate->replayingPressEvent) + return false; + + bool filtered = false; if (targetPrivate->filtersChildMouseEvents && !hasFiltered->contains(target)) { hasFiltered->insert(target); if (target->childMouseEventFilter(item, event)) |