[Kde-hardware-devel] Review Request 109384: Move advancedDiscDetect to daemon

Alexander Mezin mezin.alexander at gmail.com
Tue Mar 19 05:19:54 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109384/
-----------------------------------------------------------

(Updated March 19, 2013, 5:19 a.m.)


Review request for Solid and Lukáš Tinkl.


Changes
-------

Nobody replied, but I made a new version. Now this is a QApplication.

1) This should at least run in a separate thread. However, I didn't find how to make KDED module run in a separate thread.
2) Now it depends only on Solid, QtCore, QtDBus and QtGui. These are dependencies of Solid itself.
3) Now the code size is even less.

If anyone could tell me how to detect disconnection from session bus, then QApplication can be replaced with QCoreApplication (so QtGui dependency will be eliminated).

And I don't think that being daemon but not KDED module is a problem:
ls /usr/share/dbus-1/services/*kde*
/usr/share/dbus-1/services/org.kde.BlueDevil.Service.service  /usr/share/dbus-1/services/org.kde.krunner.service
/usr/share/dbus-1/services/org.kde.fontinst.service           /usr/share/dbus-1/services/org.kde.kuiserver.service
/usr/share/dbus-1/services/org.kde.knotify.service            /usr/share/dbus-1/services/org.kde.Solid.DiskScanner.service


Description
-------

While bug 261552 marked as fixed, optical drive spin-ups still happen more frequent than needed. Also, if there is a corrupted optical disk in the drive, a long delay happens when opening new file manager window (bug 306426).

This patch introduces a daemon that reads optical disks and remembers results, so disk access happens only once, usually right after new disk is inserted.
This is for udisks2 backend, but should also work with udisks 1. The daemon doesn't contain any backend-specific code.


This addresses bugs 261552 and 306426.
    http://bugs.kde.org/show_bug.cgi?id=261552
    http://bugs.kde.org/show_bug.cgi?id=306426


Diffs (updated)
-----

  solid/solid/CMakeLists.txt 08953fe 
  solid/solid/backends/udisks2/udisksopticaldisc.h 0cdcc66 
  solid/solid/backends/udisks2/udisksopticaldisc.cpp 23a4fc1 
  solid/solid/diskscan/CMakeLists.txt PRE-CREATION 
  solid/solid/diskscan/diskscanner.h PRE-CREATION 
  solid/solid/diskscan/diskscanner.cpp PRE-CREATION 
  solid/solid/diskscan/diskscannertask.h PRE-CREATION 
  solid/solid/diskscan/diskscannertask.cpp PRE-CREATION 
  solid/solid/diskscan/org.kde.Solid.DiskScanner.service.cmake PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/109384/diff/


Testing
-------

I tested it on top of kdelibs-4.10.1. Video DVDs are recognized correctly.


Thanks,

Alexander Mezin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20130319/c44f5f31/attachment.html>


More information about the Kde-hardware-devel mailing list