Summary: Fixes crash when hiding devices

Authored by hallas on Apr 22 2019, 5:40 PM.

Description

Summary: Fixes crash when hiding devices

Summary:
Fixes crash when hiding devices. The crash is caused by
KStandardItem::setDataValue which calls the
KStandardItemModel::onItemChanged function, and that function will
delete the KStandardItem if the data value being set is the hidden
attribute being set to true. To fix this KStandardItem now derives
QObject so that we can use deleteLater.

Test Plan:
Right click a device in the places panel and select hide
Right click the places panel and select show hidden
Right click the hidden device and select show
Right click the same device and select hide

BUG: 403064

Reviewers: Dolphin, elvisangelaccio

Reviewed By: Dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: Dolphin

Differential Revision: https://phabricator.kde.org/D21050

Details

Committed
hallasMay 13 2019, 2:58 PM
Reviewer
Dolphin
Differential Revision
D21050: Summary: Fixes crash when hiding devices
Parents
R318:2fac50f5f59b: Add Bookmark Handling
Branches
Unknown
Tags
Unknown