summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qdockwidget.cpp
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@theqtcompany.com>2016-02-05 00:06:48 +0100
committerAndy Shaw <andy.shaw@theqtcompany.com>2016-02-05 08:15:34 +0000
commit798e0064e9be78f8320ff25a9af50d1b5e5badb1 (patch)
treefdd40d1db8a5031062654097efda2132209b6a15 /src/widgets/widgets/qdockwidget.cpp
parent1c7e1d99b7c48aa1ba59cec7f03ef345ea70d38f (diff)
Fix crash introduced by 75b705fec8e9517047d7dfa98203edff69f2bf8a
This fixes the crash introduced by 75b705fec8e9517047d7dfa98203edff69f2bf8a. The drag only needs to be ended on the hide if it is actually in the middle of dragging. This enables the case of dragging the dock widget out with the mouse to continue to work. Task-number: QTBUG-50890 Change-Id: I72309dd40ee670319f2ff607ae201c46f8de4652 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/widgets/qdockwidget.cpp')
-rw-r--r--src/widgets/widgets/qdockwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp
index 481fcdac12..da6c3431ff 100644
--- a/src/widgets/widgets/qdockwidget.cpp
+++ b/src/widgets/widgets/qdockwidget.cpp
@@ -1445,7 +1445,7 @@ bool QDockWidget::event(QEvent *event)
switch (event->type()) {
#ifndef QT_NO_ACTION
case QEvent::Hide:
- if (d->state)
+ if (d->state && d->state->dragging)
d->endDrag(true);
if (layout != 0)
layout->keepSize(this);