diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-05-28 16:32:52 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-06-03 19:37:46 +0200 |
commit | 17c1ebf8bfd254ff75cc55e335d1c1fb01da547f (patch) | |
tree | 6af3a26a7addc528b0379b81510d7ad751f73ec5 /src/widgets/itemviews/qabstractitemview_p.h | |
parent | 491ea140df524a8ea6bafe08b5375583113e5248 (diff) |
QAbstractItemView: don't block dragging after double click
After d6551fe12520 it was no longer possible to start a drag with a
double click (where the first click selects an item, and the second
press+move starts the drag). Resetting the pressedItem variable to block
the emission of the clicked() signal had this unwanted side effect.
Instead, use an explicit boolean to store that the next release event
will be the result of a double click, so that the clicked() signal is not
emitted again (preventing the double-emission was the purpose of change
d6551fe12520).
Task-number: QTBUG-77771
Fixes: QTBUG-94087
Pick-to: 6.1 5.15
Change-Id: I082c5169d89eb980dcd7985ef3d302b6ff060fb9
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Olivier BARTHELEMY <perso.olivier.barthelemy@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qabstractitemview_p.h')
-rw-r--r-- | src/widgets/itemviews/qabstractitemview_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qabstractitemview_p.h b/src/widgets/itemviews/qabstractitemview_p.h index 83012a650d..521d341b8f 100644 --- a/src/widgets/itemviews/qabstractitemview_p.h +++ b/src/widgets/itemviews/qabstractitemview_p.h @@ -371,6 +371,7 @@ public: Qt::KeyboardModifiers pressedModifiers; QPoint pressedPosition; bool pressedAlreadySelected; + bool releaseFromDoubleClick; //forces the next mouseMoveEvent to send the viewportEntered signal //if the mouse is over the viewport and not over an item |