Bug 400992

Summary: Local partition cannot mount again after unmount using popmenu
Product: dolphin Reporter: innersea <innersea>
Component: panels: placesAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, thomas.surrel
Priority: NOR    
Version: 18.08.3   
Target Milestone: ---   
Platform: Neon Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description innersea@163.com 2018-11-13 06:38:49 UTC
SUMMARY
Local partition cannot mount again after unmount using popmenu.


STEPS TO REPRODUCE
1. right-click on a mounted local partition at places panel.
2. click "unmount" (or whatever English word likewise, for I'm not using English environment), so the partition is unmounted.
3. click on the partition icon (willing to mount the partition again), nothing happens.

OBSERVED RESULT
Nothing happens until close and restart dolphin, then everything is OK.


EXPECTED RESULT
No need to restart dolphin.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.14
KDE Plasma Version: 5.14.3
KDE Frameworks Version: 5.51.0
Qt Version: 5.11.2

ADDITIONAL INFORMATION
Comment 1 Thomas Surrel 2018-11-17 13:43:52 UTC
Git commit e710a6431160aee57b1eab34b11dfe64e341898c by Thomas Surrel.
Committed on 17/11/2018 at 13:43.
Pushed by thsurrel into branch 'Applications/18.12'.

Do not disconnect all StorageAccess signals when unmounting

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.

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.

Reviewers: #dolphin, #frameworks, bruns, elvisangelaccio

Reviewed By: #dolphin, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

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

M  +2    -1    src/panels/places/placesitemmodel.cpp

https://commits.kde.org/dolphin/e710a6431160aee57b1eab34b11dfe64e341898c