Commit cbbabc79 authored by Lukáš Tinkl's avatar Lukáš Tinkl
Browse files

eject the optical drive with the unmount option

fixes #274982 - The 'eject' action only unmounts data CDs rather than
ejecting them

BUG:274982
parent fd135a92
......@@ -62,16 +62,8 @@ bool UDisksOpticalDrive::eject()
QString path = m_device->udi();
// check if the device is mounted and call umount if needed
if (m_device->prop("DeviceIsMounted").toBool())
{
QDBusMessage msg = QDBusMessage::createMethodCall(UD_DBUS_SERVICE, path, UD_DBUS_INTERFACE_DISKS_DEVICE, "FilesystemUnmount");
msg << QStringList(); // options, unused now
c.call(msg, QDBus::NoBlock);
}
QDBusMessage msg = QDBusMessage::createMethodCall(UD_DBUS_SERVICE, path, UD_DBUS_INTERFACE_DISKS_DEVICE, "DriveEject");
msg << QStringList();
msg << "unmount"; // unmount parameter
return c.callWithCallback(msg, this, SLOT(slotDBusReply(QDBusMessage)), SLOT(slotDBusError(QDBusError)));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment