Fix crash in Screen Locker KCM on teardown

Authored by davidedmundson on Feb 9 2017, 6:10 PM.



As described in 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 exposed properties go through a
proxy QObject.

CCBUG: 373628

Test Plan

Pressing back whilst in the screenlocker KCM used to crash every time,
now it doesn't.

Also changed the wallpaper type, new settings appeared, I went from flat
image to a specific wallpaper, and then locked my screen.

Diff Detail

R133 KScreenLocker
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 Fix crash in Screen Locker KCM on 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, 6:10 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
graesslin accepted this revision.Feb 10 2017, 9:57 AM
graesslin added a reviewer: graesslin.
This revision is now accepted and ready to land.Feb 10 2017, 9:57 AM
This revision was automatically updated to reflect the committed changes.