diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-03-03 10:42:12 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-03-03 10:45:13 (GMT) |
commit | a4af046157c7ef94990f9520c4611597ff271c57 (patch) | |
tree | 346aaedcd51a60f721f91648fb8ea13977bd755c /src | |
parent | 60324267fbb8a8554e62aaf9ef01360709292320 (diff) | |
download | Qt-a4af046157c7ef94990f9520c4611597ff271c57.zip Qt-a4af046157c7ef94990f9520c4611597ff271c57.tar.gz Qt-a4af046157c7ef94990f9520c4611597ff271c57.tar.bz2 |
fixed a memory leak when restoring a state in QMainWindow
Task-number: QTBUG-8631
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/qdockarealayout.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp index c1b1ea3..f44858a 100644 --- a/src/gui/widgets/qdockarealayout.cpp +++ b/src/gui/widgets/qdockarealayout.cpp @@ -1985,7 +1985,10 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*> emit widget->dockLocationChanged(toDockWidgetArea(dockPos)); } } - + if (testing) { + //was it is not really added to the layout, we need to delete the object here + delete item.widgetItem; + } } } else if (nextMarker == SequenceMarker) { int dummy; |