summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamarque V. Souza <lamarque@kde.org>2012-03-04 07:02:07 (GMT)
committerLamarque V. Souza <lamarque@kde.org>2012-03-04 07:02:07 (GMT)
commit1b0ecb4d951a4f0c742ba641f9954d45c015a5c3 (patch)
tree3b9c7e3788c011d14ae2139ada0267347db31177
parenta57521dfa7b6a4552636291a15bd5dc4a3052d63 (diff)
Fix ejection of optical drives. This bug affects Device Notifier
although the problem is in soliddevice dataengine. FIXED-IN: 4.8.2
-rw-r--r--plasma/generic/dataengines/soliddevice/soliddevicejob.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/plasma/generic/dataengines/soliddevice/soliddevicejob.cpp b/plasma/generic/dataengines/soliddevice/soliddevicejob.cpp
index f56ba32..44817bb 100644
--- a/plasma/generic/dataengines/soliddevice/soliddevicejob.cpp
+++ b/plasma/generic/dataengines/soliddevice/soliddevicejob.cpp
@@ -42,6 +42,9 @@ void SolidDeviceJob::start()
else if (operation == "unmount") {
if (device.is<Solid::OpticalDisc>()) {
Solid::OpticalDrive *drive = device.as<Solid::OpticalDrive>();
+ if (!drive) {
+ drive = device.parent().as<Solid::OpticalDrive>();
+ }
if (drive) {
drive->eject();
}