summaryrefslogtreecommitdiffstats
path: root/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetoothsettings/bluez/bluetoothdevice_p.cpp')
-rw-r--r--src/bluetoothsettings/bluez/bluetoothdevice_p.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp b/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp
index 4705ac4..4440277 100644
--- a/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp
+++ b/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp
@@ -32,6 +32,8 @@
#include "objectmanager_interface.cpp"
#include "moc_objectmanager_interface.cpp"
#include "device1_interface.h"
+#include "connman_technology_interface.h"
+#include "connmancommon.h"
BluetoothDevicePrivate::BluetoothDevicePrivate(BluetoothDevice *parent) : QObject(parent)
,q_ptr(parent)
@@ -47,6 +49,9 @@ BluetoothDevicePrivate::BluetoothDevicePrivate(BluetoothDevice *parent) : QObjec
m_manager = new OrgFreedesktopDBusObjectManagerInterface(QStringLiteral("org.bluez"),
QStringLiteral("/"),
QDBusConnection::systemBus(), this);
+ m_technology = new NetConnmanTechnologyInterface(QStringLiteral("net.connman"),
+ QStringLiteral("/net/connman/technology/bluetooth"),
+ QDBusConnection::systemBus(), this);
QDBusPendingReply<ManagedObjectList> reply = m_manager->GetManagedObjects();
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
connect(watcher, &QDBusPendingCallWatcher::finished,
@@ -70,6 +75,8 @@ void BluetoothDevicePrivate::setPowered(const bool& aPowered)
if (!m_localDevice)
return;
+ m_technology->SetProperty(PropertyPowered, QDBusVariant(QVariant(aPowered)));
+
if (aPowered) {
m_localDevice->powerOn();
}