don't use all scriptable contents as it will use regular signals too

this looks like a bug in Qt to me tbh. To get around it, restrict things more
pull/135/head
Michael Zanetti 2018-03-13 12:59:56 +01:00
parent 028abeafa2
commit 3719d315b5
3 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,7 @@ public:
bool agentAvailable() const;
public slots:
Q_SCRIPTABLE void RegisterButtonAgent(const QDBusObjectPath &agentPath);
Q_SCRIPTABLE void UnregisterButtonAgent();

View File

@ -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);
};

View File

@ -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;