Keep a reference to the Solid::Device whilst we are using the Solid::Device interface

Review Request #127862 - Created May 7, 2016 and submitted

Information
David Edmundson
kinfocenter
b8c8792...
Reviewers
plasma
Otherwise we were effectively relying on Solid's cache for memory
management.

This led to a problem that QML's QObject wrapper would detect the
Solid::Battery was being deleted on shutdown, and re-evaluate
currentBattery. This would then call BatteryModel.fetch(0) which being
slightly behind would then return an invalid object.

This ensure items get deleted in the correct order.

BUG: 350861

  
Mark Gaiser
Kai Uwe Broulik
David Edmundson
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 95569a0eae884427c7f7ab11fd63ae577f0be16d by David Edmundson to branch Plasma/5.6.
Loading...