Build DBus interfaces library for SailfishConnect

This commit is contained in:
Richard Liebscher 2020-01-06 19:28:36 +00:00 committed by Nicolas Fella
parent a6f9d90b3a
commit b61cf6b28c
4 changed files with 23 additions and 18 deletions

View file

@ -83,12 +83,12 @@ if(PRIVATE_DBUS_ENABLED OR APPLE)
endif() endif()
add_subdirectory(core) add_subdirectory(core)
add_subdirectory(plugins)
add_subdirectory(interfaces)
if (NOT SAILFISHOS) if (NOT SAILFISHOS)
add_subdirectory(icon) add_subdirectory(icon)
add_subdirectory(interfaces)
add_subdirectory(data) add_subdirectory(data)
add_subdirectory(plugins)
add_subdirectory(cli) add_subdirectory(cli)
add_subdirectory(declarativeplugin) add_subdirectory(declarativeplugin)

View file

@ -22,22 +22,22 @@ set(libkdeconnect_SRC
# modeltest.cpp # modeltest.cpp
) )
geninterface(${CMAKE_SOURCE_DIR}/core/daemon.h daemoninterface) geninterface(${PROJECT_SOURCE_DIR}/core/daemon.h daemoninterface)
geninterface(${CMAKE_SOURCE_DIR}/core/device.h deviceinterface) geninterface(${PROJECT_SOURCE_DIR}/core/device.h deviceinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/battery/batterydbusinterface.h devicebatteryinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/battery/batterydbusinterface.h devicebatteryinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/sftp/sftpplugin.h devicesftpinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/sftp/sftpplugin.h devicesftpinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/notifications/notificationsdbusinterface.h devicenotificationsinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/notifications/notificationsdbusinterface.h devicenotificationsinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/findmyphone/findmyphoneplugin.h devicefindmyphoneinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/findmyphone/findmyphoneplugin.h devicefindmyphoneinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/notifications/notification.h notificationinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/notifications/notification.h notificationinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/mprisremote/mprisremoteplugin.h mprisremoteinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/mprisremote/mprisremoteplugin.h mprisremoteinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/remotecontrol/remotecontrolplugin.h remotecontrolinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/remotecontrol/remotecontrolplugin.h remotecontrolinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/lockdevice/lockdeviceplugin.h lockdeviceinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/lockdevice/lockdeviceplugin.h lockdeviceinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/remotecommands/remotecommandsplugin.h remotecommandsinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/remotecommands/remotecommandsplugin.h remotecommandsinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/remotekeyboard/remotekeyboardplugin.h remotekeyboardinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/remotekeyboard/remotekeyboardplugin.h remotekeyboardinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/sms/smsplugin.h smsinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/sms/smsplugin.h smsinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/sms/conversationsdbusinterface.h conversationsinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/sms/conversationsdbusinterface.h conversationsinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/share/shareplugin.h shareinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/share/shareplugin.h shareinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/remotesystemvolume/remotesystemvolumeplugin.h remotesystemvolumeinterface) geninterface(${PROJECT_SOURCE_DIR}/plugins/remotesystemvolume/remotesystemvolumeplugin.h remotesystemvolumeinterface)
add_library(kdeconnectinterfaces SHARED ${libkdeconnect_SRC}) add_library(kdeconnectinterfaces SHARED ${libkdeconnect_SRC})
set_target_properties(kdeconnectinterfaces PROPERTIES set_target_properties(kdeconnectinterfaces PROPERTIES

View file

@ -23,10 +23,14 @@
QString DaemonDbusInterface::activatedService() { QString DaemonDbusInterface::activatedService() {
static const QString service = QStringLiteral("org.kde.kdeconnect"); static const QString service = QStringLiteral("org.kde.kdeconnect");
#ifndef SAILFISHOS
auto reply = DBusHelper::sessionBus().interface()->startService(service); auto reply = DBusHelper::sessionBus().interface()->startService(service);
if (!reply.isValid()) { if (!reply.isValid()) {
qWarning() << "error activating kdeconnectd:" << reply.error(); qWarning() << "error activating kdeconnectd:" << reply.error();
} }
#endif
return service; return service;
} }

View file

@ -25,6 +25,7 @@
#include <QDBusInterface> #include <QDBusInterface>
#include <dbushelper.h> #include <dbushelper.h>
#include <core/qtcompat_p.h>
RemoteSinksModel::RemoteSinksModel(QObject* parent) RemoteSinksModel::RemoteSinksModel(QObject* parent)
: QAbstractListModel(parent) : QAbstractListModel(parent)