Avoid a crash on Kwin decoration KCM teardown
ClosedPublic

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

Details

Summary

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

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson retitled this revision from to Avoid a crash on Kwin decoration KCM teardown.Feb 9 2017, 5:35 PM
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!

+1

cfeck added inline comments.Feb 9 2017, 9:05 PM
kcmkwin/kwindecoration/kcm.cpp
103–106

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.

Hero!

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.