Summary: Fixes crash when hiding devices
ClosedPublic

Authored by hallas on May 6 2019, 5:34 PM.

Details

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

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
hallas created this revision.May 6 2019, 5:34 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptMay 6 2019, 5:34 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
hallas requested review of this revision.May 6 2019, 5:34 PM
elvisangelaccio accepted this revision.May 11 2019, 9:41 AM
This revision is now accepted and ready to land.May 11 2019, 9:41 AM
This revision was automatically updated to reflect the committed changes.