make sure Solid::Battery is not deleted from QML
Summary: Battery objects are casted DeviceInterface objects and those are owned by Solid. deleting them outside solid means they will end up as dangling pointers inside Solid's global static objects. when switching away from the energy KCM the qml engine would get cleaned up as part of the KCM destruction, qml would then sweep up the Battery object and corrupt the solid internal pointers. to prevent this, explicitly mark Battery objects we give to QML as owned on the c++ side. BUG: 413003 FIXED-IN: 5.18.0 Test Plan: open kinfocenter switch to energy switch away switch to energy no crash Reviewers: broulik, davidedmundson Reviewed By: davidedmundson Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D26725
parent
b18b1988
Please register or sign in to comment