summaryrefslogtreecommitdiff
path: root/src/controls/SplitView.qml
diff options
context:
space:
mode:
authorDavid McFarland <corngood@gmail.com>2013-07-19 22:44:53 -0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-15 17:02:30 +0200
commit2b308e33bec09c8a792b37282f6172a59dc3d543 (patch)
tree12de9423981bf9578b896133fa46ea8ca7195d4b /src/controls/SplitView.qml
parente59cc3ffbfd9b5e1d72e9924dae8705de769dca7 (diff)
downloadqtquickcontrols-2b308e33bec09c8a792b37282f6172a59dc3d543.tar.gz
Fix for script errors when unloading a SplitView
Disconnects all signals from child items on destruction Task-number: QTBUG-32526 Change-Id: Ib0b2e13be549164d4c967359856971c9d08d2a6f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/controls/SplitView.qml')
-rw-r--r--src/controls/SplitView.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml
index 1cc8199f..e8d6fc9a 100644
--- a/src/controls/SplitView.qml
+++ b/src/controls/SplitView.qml
@@ -195,6 +195,8 @@ Item {
handleLoader.createObject(splitterHandles, {"__handleIndex":splitterItems.children.length - 1})
item.parent = splitterItems
i-- // item was removed from list
+
+ // should match disconnections in Component.onDestruction
item.widthChanged.connect(d.updateLayout)
item.heightChanged.connect(d.updateLayout)
item.Layout.maximumWidthChanged.connect(d.updateLayout)
@@ -484,6 +486,14 @@ Item {
Component.onDestruction: {
for (var i=0; i<splitterItems.children.length; ++i) {
var item = splitterItems.children[i];
+
+ // should match connections in init()
+ item.widthChanged.disconnect(d.updateLayout)
+ item.heightChanged.disconnect(d.updateLayout)
+ item.Layout.maximumWidthChanged.disconnect(d.updateLayout)
+ item.Layout.minimumWidthChanged.disconnect(d.updateLayout)
+ item.Layout.maximumHeightChanged.disconnect(d.updateLayout)
+ item.Layout.minimumHeightChanged.disconnect(d.updateLayout)
item.visibleChanged.disconnect(d.updateFillIndex)
item.Layout.fillWidthChanged.disconnect(d.updateFillIndex)
item.Layout.fillHeightChanged.disconnect(d.updateFillIndex)