Linux: only eject through udisks2 when we have DBus

This commit is contained in:
Floris Bos 2023-03-24 15:41:15 +01:00
parent 0790003d6d
commit 83e2d22a9a

View file

@ -778,9 +778,11 @@ void DownloadThread::_writeComplete()
{ {
eject_disk(_filename.constData()); eject_disk(_filename.constData());
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
#ifndef QT_NO_DBUS
/* mountutils only implemented unmount and not eject on Linux. Do so through udisks2 */ /* mountutils only implemented unmount and not eject on Linux. Do so through udisks2 */
UDisks2Api udisks; UDisks2Api udisks;
udisks.ejectDrive(_filename); udisks.ejectDrive(_filename);
#endif
#endif #endif
} }