https://bugs.kde.org/show_bug.cgi?id=394348

--- Comment #9 from Stefan Brüns <stefan.bru...@rwth-aachen.de> ---
Git commit 8e9fc89918c4a8817b624a61e0d2d32d349722cc by Stefan Brüns.
Committed on 14/08/2018 at 13:03.
Pushed by bruns into branch 'master'.

Force reevaluation of Predicates if interfaces are removed

Summary:
If an application wants to show only specicific devices based on predicate
matching, and one of the matching devices loses an interface which is
critical for the Predicate to match, the application has to be notified.

As there is no dedicated signal to notify the application about the
fact a device no longer has e.g. a Solid::StorageAccess iface, signal the
device has been removed, and immediately readd it, as the device may
still be relevant.

Remove the call to updateBackend(udi), as the device backend listens to
the InterfacesRemoved signal itself and updates its property cache.

Test Plan:
1. Image file mounting via loop-back
  - udisksctl loop-setup -f ~/fat.img
  -> Icon appears under "Devices"
  - unmount via context-menu in dolphin
  -> device icon stays in "Devices"
  - set "Auto-clear" flag on loop (e.g. losetup --detach-all)
  - remount
  - unmount
  -> device icon vanishes from "Devices"
2. CD-ROM/DVD
  -  icon appear when a non-blank medium is inserted
  - vanishes on medium removal
3. USB stick
  - for each mountable filesystem, an icon appears under "Removable devices"
  - formatting a partition with a non-mountable filesystem/blank removes the
entry
  - formatting with a mountable FS (re)adds the entry

Reviewers: #frameworks, broulik, ngraham, apol

Reviewed By: broulik

Subscribers: apol, anthonyfieroni, kde-frameworks-devel

Tags: #frameworks

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

M  +20   -3    src/solid/devices/backends/udisks2/udisksmanager.cpp

https://commits.kde.org/solid/8e9fc89918c4a8817b624a61e0d2d32d349722cc

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to