Fix compile without dbus
This commit is contained in:
parent
c818ce19e9
commit
a554032823
@ -416,7 +416,6 @@ set(HEADERS
|
||||
|
||||
device/connecteddevice.h
|
||||
device/devicedatabasebackend.h
|
||||
device/devicekitlister.h
|
||||
device/devicelister.h
|
||||
device/devicemanager.h
|
||||
device/deviceproperties.h
|
||||
@ -649,15 +648,16 @@ optional_source(HAVE_DBUS
|
||||
core/mpris2.h
|
||||
)
|
||||
|
||||
optional_source(HAVE_DEVICEKIT
|
||||
SOURCES device/devicekitlister.cpp
|
||||
HEADERS device/devicekitlister.h
|
||||
)
|
||||
|
||||
optional_source(HAVE_UDISKS2
|
||||
SOURCES device/udisks2lister.cpp
|
||||
HEADERS device/udisks2lister.h
|
||||
)
|
||||
if(HAVE_DBUS)
|
||||
optional_source(HAVE_DEVICEKIT
|
||||
SOURCES device/devicekitlister.cpp
|
||||
HEADERS device/devicekitlister.h
|
||||
)
|
||||
optional_source(HAVE_UDISKS2
|
||||
SOURCES device/udisks2lister.cpp
|
||||
HEADERS device/udisks2lister.h
|
||||
)
|
||||
endif()
|
||||
|
||||
# Libgpod device backend
|
||||
optional_source(HAVE_LIBGPOD
|
||||
|
@ -20,6 +20,9 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <dbus/udisks.h>
|
||||
#include <dbus/udisksdevice.h>
|
||||
|
||||
#include <QMutex>
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
@ -36,8 +39,6 @@
|
||||
|
||||
#include "core/logging.h"
|
||||
#include "core/utilities.h"
|
||||
#include "dbus/udisks.h"
|
||||
#include "dbus/udisksdevice.h"
|
||||
#include "devicekitlister.h"
|
||||
|
||||
DeviceKitLister::DeviceKitLister() {}
|
||||
|
@ -60,7 +60,6 @@
|
||||
#include "connecteddevice.h"
|
||||
#include "devicelister.h"
|
||||
#include "devicedatabasebackend.h"
|
||||
#include "devicekitlister.h"
|
||||
#include "devicestatefiltermodel.h"
|
||||
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER)
|
||||
@ -84,8 +83,13 @@
|
||||
#ifdef HAVE_LIBMTP
|
||||
# include "mtpdevice.h"
|
||||
#endif
|
||||
#ifdef HAVE_UDISKS2
|
||||
# include "udisks2lister.h"
|
||||
#ifdef HAVE_DBUS
|
||||
# ifdef HAVE_DEVICEKIT
|
||||
# include "devicekitlister.h"
|
||||
# endif
|
||||
# ifdef HAVE_UDISKS2
|
||||
# include "udisks2lister.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
using std::bind;
|
||||
@ -219,14 +223,14 @@ DeviceManager::DeviceManager(Application *app, QObject *parent)
|
||||
connected_devices_model_ = new DeviceStateFilterModel(this);
|
||||
connected_devices_model_->setSourceModel(this);
|
||||
|
||||
// CD devices are detected via the DiskArbitration framework instead on Darwin.
|
||||
// CD devices are detected via the DiskArbitration framework instead on MacOs.
|
||||
#if defined(HAVE_AUDIOCD) && defined(HAVE_GSTREAMER) && !defined(Q_OS_MACOS)
|
||||
AddLister(new CddaLister);
|
||||
#endif
|
||||
#ifdef HAVE_DEVICEKIT
|
||||
#if defined(HAVE_DBUS) && defined(HAVE_DEVICEKIT)
|
||||
AddLister(new DeviceKitLister);
|
||||
#endif
|
||||
#ifdef HAVE_UDISKS2
|
||||
#if defined(HAVE_DBUS) && defined(HAVE_UDISKS2)
|
||||
AddLister(new Udisks2Lister);
|
||||
#endif
|
||||
#ifdef HAVE_GIO
|
||||
|
@ -17,6 +17,12 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <dbus/objectmanager.h>
|
||||
#include <dbus/udisks2block.h>
|
||||
#include <dbus/udisks2drive.h>
|
||||
#include <dbus/udisks2filesystem.h>
|
||||
#include <dbus/udisks2job.h>
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QMutex>
|
||||
#include <QList>
|
||||
@ -37,11 +43,6 @@
|
||||
|
||||
#include "core/logging.h"
|
||||
#include "core/utilities.h"
|
||||
#include "dbus/objectmanager.h"
|
||||
#include "dbus/udisks2block.h"
|
||||
#include "dbus/udisks2drive.h"
|
||||
#include "dbus/udisks2filesystem.h"
|
||||
#include "dbus/udisks2job.h"
|
||||
|
||||
#include "udisks2lister.h"
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
# include "dbus/gnomesettingsdaemon.h"
|
||||
# include <dbus/gnomesettingsdaemon.h>
|
||||
#endif
|
||||
|
||||
#include <QAction>
|
||||
|
@ -20,6 +20,10 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
# include <dbus/notification.h>
|
||||
#endif
|
||||
|
||||
#include <QObject>
|
||||
#include <QCoreApplication>
|
||||
#include <QList>
|
||||
@ -41,10 +45,6 @@
|
||||
#include "core/systemtrayicon.h"
|
||||
#include "covermanager/currentartloader.h"
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
# include "dbus/notification.h"
|
||||
#endif
|
||||
|
||||
const char *OSD::kSettingsGroup = "OSD";
|
||||
|
||||
OSD::OSD(SystemTrayIcon *tray_icon, Application *app, QObject *parent)
|
||||
|
@ -100,7 +100,9 @@ class OSD : public QObject {
|
||||
QString ReplaceVariable(const QString &variable, const Song &song);
|
||||
|
||||
private slots:
|
||||
#if defined(HAVE_DBUS) && defined(HAVE_X11)
|
||||
void CallFinished(QDBusPendingCallWatcher *watcher);
|
||||
#endif
|
||||
void AlbumArtLoaded(const Song &song, const QString &uri, const QImage &image);
|
||||
|
||||
private:
|
||||
|
@ -23,6 +23,10 @@
|
||||
#include <stdbool.h>
|
||||
#include <memory>
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
# include <dbus/notification.h>
|
||||
#endif
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QObject>
|
||||
#include <QByteArray>
|
||||
@ -48,7 +52,6 @@
|
||||
#include "osd.h"
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
# include "dbus/notification.h"
|
||||
|
||||
QDBusArgument& operator<<(QDBusArgument& arg, const QImage& image) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user