Do not disconnect all StorageAccess signals when unmounting
ClosedPublic

Authored by thsurrel on Nov 13 2018, 10:11 AM.

Details

Summary

The problem is caused by the fact device interfaces returned by
Solid (e.g. item->device().as<Solid::StorageAccess>()) are not
full objects, but only references/pointers to a per-device-object,
i.e. requesting the same interface for a device will return the same
address every time.

If the interface is used used in multiple places, calling disconnect
on the interface address disconnects the signals for all users.

BUG: 400992

Test Plan

In Dolphin, mount a local partition (e.g. a Windows partition)
then unmount it (right click on it in Places, then Unmount).
Try to access it again by clicking on it in Places, we should
get access to it correctly.

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.
thsurrel created this revision.Nov 13 2018, 10:11 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptNov 13 2018, 10:11 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
thsurrel requested review of this revision.Nov 13 2018, 10:11 AM
ngraham edited reviewers, added: Frameworks, bruns; removed: VDG.Nov 13 2018, 11:04 AM

I think this is correct, but the summary can be improved a little bit.

The problem is caused by the fact device interfaces returned by Solid (e.g. item->device().as<Solid::StorageAccess>()) are not full objects, but only references/pointers to a per-device-object, i.e. requesting the same interface for a device will return the same address every time.

If the interface is used used in multiple places, calling disconnect on the interface address disconnects the signals for all users.

thsurrel edited the summary of this revision. (Show Details)Nov 13 2018, 10:53 PM
elvisangelaccio accepted this revision.Nov 17 2018, 11:15 AM
elvisangelaccio added a subscriber: elvisangelaccio.

Thanks, this fixes the bug for me.

I think we can ship it on the stable branch (Applications/18.12)

This revision is now accepted and ready to land.Nov 17 2018, 11:15 AM
This revision was automatically updated to reflect the committed changes.