D20508: frameworks-solid: udisks2: fix media change detection for external optical drives

Rok Mandeljc noreply at phabricator.kde.org
Sat Apr 13 15:47:57 BST 2019


rokmandeljc created this revision.
rokmandeljc added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
rokmandeljc requested review of this revision.

REVISION SUMMARY
  If an external optical drive is connected to system after Solid does its initial introspection, the resulting UDI does not get a mediaChanged signal/slot connection, and thus fails to react to the media change. Consequently, disc content is not properly updated after the medium is ejected, causing bug #394348.
  
  This patch assumes that an addition of "org.freedesktop.UDisks2.Block" interface means that a new device has been added; in this case, it performs Device::mightBeOpticalDisc() check to add the slotMediaChanged() connection.

TEST PLAN
  Test steps:
  
  1. Start KDE Plasma session. Make sure K3b is installed.
  2. Connect an external USB optical drive.
  3. Insert the disc
  4. Observe Device action notifications for the inserted disc.
  5. Eject the disc.
  6. Observe Device action notifications.
  
  Behavior before patch: after disc is ejected, a "Copy with K3b" action remains available for the drive
  See: https://bugs.kde.org/show_bug.cgi?id=394348
  
  Behavior after patch: after disc is ejected, no actions remain available for the drive

REPOSITORY
  R245 Solid

REVISION DETAIL
  https://phabricator.kde.org/D20508

AFFECTED FILES
  src/solid/devices/backends/udisks2/udisksmanager.cpp

To: rokmandeljc
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190413/7fb3bfcc/attachment.html>


More information about the Kde-frameworks-devel mailing list