diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-03-25 13:11:27 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-03-25 13:11:27 (GMT) |
commit | 367e468dc68c7924be86118df49f33d96380a5b7 (patch) | |
tree | e33b122492c233888e41c09805c63bf5002146f1 /src/gui/widgets/qmainwindowlayout.cpp | |
parent | 817e34429fe6e46785fa439aaf172072d4327ef3 (diff) | |
download | Qt-367e468dc68c7924be86118df49f33d96380a5b7.zip Qt-367e468dc68c7924be86118df49f33d96380a5b7.tar.gz Qt-367e468dc68c7924be86118df49f33d96380a5b7.tar.bz2 |
Fix a possible crash in QMainWindow when dragging a dock widget.
Even when not animated, we need to set the plugging widget when
plugging. This avoids a hover to be triggered in the middle of the
operation.
Task-number: 248069
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/widgets/qmainwindowlayout.cpp')
-rw-r--r-- | src/gui/widgets/qmainwindowlayout.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qmainwindowlayout.cpp b/src/gui/widgets/qmainwindowlayout.cpp index 768446e..eade633 100644 --- a/src/gui/widgets/qmainwindowlayout.cpp +++ b/src/gui/widgets/qmainwindowlayout.cpp @@ -1542,8 +1542,8 @@ bool QMainWindowLayout::plug(QLayoutItem *widgetItem) if (!previousPath.isEmpty()) layoutState.remove(previousPath); + pluggingWidget = widget; if (dockOptions & QMainWindow::AnimatedDocks) { - pluggingWidget = widget; QRect globalRect = currentGapRect; globalRect.moveTopLeft(parentWidget()->mapToGlobal(globalRect.topLeft())); #ifndef QT_NO_DOCKWIDGET @@ -1575,6 +1575,7 @@ bool QMainWindowLayout::plug(QLayoutItem *widgetItem) #endif currentGapPos.clear(); updateGapIndicator(); + pluggingWidget = 0; } return true; |