diff options
author | Axel Spoerl <axel.spoerl@qt.io> | 2023-11-15 12:37:07 +0100 |
---|---|---|
committer | Axel Spoerl <axel.spoerl@qt.io> | 2023-11-17 22:07:01 +0100 |
commit | 17372faf3f5e4a9c2577007ed5b38275e64bad89 (patch) | |
tree | a50bcb1962a6689fdaa4ab986eeeb5f2007056ba /src/widgets/widgets/qdockwidget_p.h | |
parent | 4c36bb854cb8deaa2841bf2aba7e71ea4b1a06dd (diff) |
Remove bool trap in QDockWidgetPrivate::endDrag()
endDrag(false) meant to end a drag with a dock location change.
endDrag(true) meant to abort a drag without a dock location change.
Replace this with a meaningful enumeration.
Define a dummy enum for builds w/o QDockWidget.
Task-number: QTBUG-118578
Task-number: QTBUG-118579
Pick-to: 6.6 6.5
Change-Id: I786f4210f5a3ee67ffcf0dc9285f77a480148569
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qdockwidget_p.h')
-rw-r--r-- | src/widgets/widgets/qdockwidget_p.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/widgets/qdockwidget_p.h b/src/widgets/widgets/qdockwidget_p.h index 72cf08177f..b768f11e2c 100644 --- a/src/widgets/widgets/qdockwidget_p.h +++ b/src/widgets/widgets/qdockwidget_p.h @@ -56,6 +56,11 @@ public: Widget }; + enum class EndDragMode { + LocationChange, + Abort + }; + void init(); void toggleView(bool); void toggleTopLevel(); @@ -92,7 +97,7 @@ public: void nonClientAreaMouseEvent(QMouseEvent *event); void initDrag(const QPoint &pos, bool nca); void startDrag(DragScope scope); - void endDrag(bool abort = false); + void endDrag(EndDragMode mode); void moveEvent(QMoveEvent *event); void recalculatePressPos(QResizeEvent *event); |