summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-03-03 10:42:12 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-03-03 10:45:13 (GMT)
commita4af046157c7ef94990f9520c4611597ff271c57 (patch)
tree346aaedcd51a60f721f91648fb8ea13977bd755c /src/gui
parent60324267fbb8a8554e62aaf9ef01360709292320 (diff)
downloadQt-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/gui')
-rw-r--r--src/gui/widgets/qdockarealayout.cpp5
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;