diff --git a/libnymea-core/pushbuttondbusservice.h b/libnymea-core/pushbuttondbusservice.h index ec2df20b..2b8eb619 100644 --- a/libnymea-core/pushbuttondbusservice.h +++ b/libnymea-core/pushbuttondbusservice.h @@ -37,6 +37,7 @@ public: bool agentAvailable() const; +public slots: Q_SCRIPTABLE void RegisterButtonAgent(const QDBusObjectPath &agentPath); Q_SCRIPTABLE void UnregisterButtonAgent(); diff --git a/libnymea/hardware/bluetoothlowenergy/bluetoothlowenergymanager.h b/libnymea/hardware/bluetoothlowenergy/bluetoothlowenergymanager.h index b02a0f52..a3c03adf 100644 --- a/libnymea/hardware/bluetoothlowenergy/bluetoothlowenergymanager.h +++ b/libnymea/hardware/bluetoothlowenergy/bluetoothlowenergymanager.h @@ -51,6 +51,7 @@ public: virtual BluetoothLowEnergyDevice *registerDevice(const QBluetoothDeviceInfo &deviceInfo, const QLowEnergyController::RemoteAddressType &addressType = QLowEnergyController::RandomAddress) = 0; virtual void unregisterDevice(BluetoothLowEnergyDevice *bluetoothDevice) = 0; +public slots: Q_SCRIPTABLE void EnableBluetooth(bool enabled); }; diff --git a/libnymea/nymeadbusservice.cpp b/libnymea/nymeadbusservice.cpp index 52666585..357ae7c0 100644 --- a/libnymea/nymeadbusservice.cpp +++ b/libnymea/nymeadbusservice.cpp @@ -36,7 +36,7 @@ NymeaDBusService::NymeaDBusService(const QString &objectPath, QObject *parent) : finalObjectPath.append(part.at(0).toUpper()); finalObjectPath.append(part.right(part.length() - 1)); } - status = s_connection.registerObject(finalObjectPath, this, QDBusConnection::ExportScriptableContents); + status = s_connection.registerObject(finalObjectPath, this, QDBusConnection::ExportScriptableSlots); if (!status) { qCWarning(dcApplication()) << "Failed to register D-Bus object:" << finalObjectPath; return;