From 83e2d22a9ab85b5214dab7b33b6924a4299be890 Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Fri, 24 Mar 2023 15:41:15 +0100 Subject: [PATCH] Linux: only eject through udisks2 when we have DBus --- src/downloadthread.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/downloadthread.cpp b/src/downloadthread.cpp index 78d3678..01ce22d 100644 --- a/src/downloadthread.cpp +++ b/src/downloadthread.cpp @@ -778,9 +778,11 @@ void DownloadThread::_writeComplete() { eject_disk(_filename.constData()); #ifdef Q_OS_LINUX +#ifndef QT_NO_DBUS /* mountutils only implemented unmount and not eject on Linux. Do so through udisks2 */ UDisks2Api udisks; udisks.ejectDrive(_filename); +#endif #endif }