diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-02-02 15:39:40 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-02-02 15:43:10 (GMT) |
commit | 3d2dbeb65089efaff4b92b7d13c13c1a234f71b0 (patch) | |
tree | 467ac377838e7c71a47c537d09a406a5e04f0a68 /src/gui/widgets/qmainwindowlayout.cpp | |
parent | 94b3918fb52858064811c4993dac6392d0043b24 (diff) | |
download | Qt-3d2dbeb65089efaff4b92b7d13c13c1a234f71b0.zip Qt-3d2dbeb65089efaff4b92b7d13c13c1a234f71b0.tar.gz Qt-3d2dbeb65089efaff4b92b7d13c13c1a234f71b0.tar.bz2 |
Avoids a possible crash when saving the state of a main window
The crash could appear when saving the state of the main window in
response to the visibilityChanged of the dock widgets.
Task-number: QTBUG-7838
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/widgets/qmainwindowlayout.cpp')
-rw-r--r-- | src/gui/widgets/qmainwindowlayout.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/widgets/qmainwindowlayout.cpp b/src/gui/widgets/qmainwindowlayout.cpp index d1e7285..fc75c92 100644 --- a/src/gui/widgets/qmainwindowlayout.cpp +++ b/src/gui/widgets/qmainwindowlayout.cpp @@ -1627,6 +1627,13 @@ void QMainWindowLayout::animationFinished(QWidget *widget) tb->d_func()->plug(currentGapRect); #endif + savedState.clear(); + currentGapPos.clear(); + pluggingWidget = 0; + //applying the state will make sure that the currentGap is updated correctly + //and all the geometries (especially the one from the central widget) is correct + layoutState.apply(false); + #ifndef QT_NO_DOCKWIDGET #ifndef QT_NO_TABBAR if (qobject_cast<QDockWidget*>(widget) != 0) { @@ -1637,13 +1644,6 @@ void QMainWindowLayout::animationFinished(QWidget *widget) } #endif #endif - - savedState.clear(); - currentGapPos.clear(); - pluggingWidget = 0; - //applying the state will make sure that the currentGap is updated correctly - //and all the geometries (especially the one from the central widget) is correct - layoutState.apply(false); } if (!widgetAnimator.animating()) { |