Avoid a crash on Kwin decoration KCM teardown

Authored by davidedmundson on Feb 9 2017, 5:35 PM.



As described in https://bugreports.qt.io/browse/QTBUG-57714 exposing a
QWidget as a context item to QtQuick can crash. Especially as the
engine's context property gets deleted whilst deleting the parent item.

This patch reworks the code so that the models are exposed to QML
directly rather than going through a QWidget.

CCBUG: 373628

Test Plan

Pressing back whilst in the decoration KCM used to crash every time, now it doesn't.
I still have the buttons.

Diff Detail

R108 KWin
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
davidedmundson retitled this revision from to Avoid a crash on Kwin decoration KCM teardown.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 9 2017, 5:35 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
cfeck added a subscriber: cfeck.Feb 9 2017, 9:02 PM

Be my hero!


cfeck added inline comments.Feb 9 2017, 9:05 PM

while you are at it, QStringLiteral?

graesslin accepted this revision.Feb 10 2017, 6:35 AM
graesslin added a reviewer: graesslin.
graesslin added a subscriber: graesslin.


This revision is now accepted and ready to land.Feb 10 2017, 6:35 AM
This revision was automatically updated to reflect the committed changes.