[PATCH] Don't manually call reverseTwinsChanged when destructing FormLayout
authorNicolas Fella <nicolas.fella@gmx.de>
Thu, 14 Jan 2021 14:23:39 +0000 (15:23 +0100)
committerNorbert Preining <norbert@preining.info>
Fri, 22 Jan 2021 15:01:33 +0000 (15:01 +0000)
This line causes a crash when destructing the screenlocker KCM.
It doesn't seem to be caused by reverseTwinsChanged itself but rather by
accessing the Qt object. I don't fully undestand the root cause.

However the call itself appears to be unnecessary since in the line
above we write to reverseTwins and that triggers the changed signal if
needed.

BUG: 431419
BUG: 428461

Gbp-Pq: Name upstream-b4a6c562-dont-manually-call-reverseTwinChanged-when-destructing-FormLayout.patch

src/controls/FormLayout.qml

index 74292fdada000d8d70b04efcc63457d09c23d75a..a27903f2c2cac48e6e131edc39d794b635ccf56e 100644 (file)
@@ -84,7 +84,6 @@ Item {
     Component.onDestruction: {
         for (let i in twinFormLayouts) {
             twinFormLayouts[i].children[0].reverseTwins = twinFormLayouts[i].children[0].reverseTwins.filter(function(value, index, arr){ return value != root;})
-            Qt.callLater(() => twinFormLayouts[i].children[0].reverseTwinsChanged());
         }
     }
     GridLayout {