diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2013-06-27 17:43:03 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-28 08:39:01 +0200 |
commit | 42e8371600155bcff620929d5bf4dff998f3324f (patch) | |
tree | a0b89ad51f07f50eca28903212049423bddc58c5 /src/bluetooth/qbluetoothlocaldevice_bluez.cpp | |
parent | 06533c66b54f2ac9a9911e093723b71e27bd677d (diff) |
Fix broken QBluetoothLocalDevice::isValid() behavior
The Bluez and QNX backend always returned true. They should only
return true if the local device is truly available or if the
passed QBluetoothAddress is indeed one of the local bluetooth
devices.
The related unit test was extended to ensure common bahvior of
invalid QBluetoothLocalDevice instance on all platforms.
Task-number: QTBUG-32068
Change-Id: I40ab4db48dc82ba0d1c0bb5275e96a3ee812b01a
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothlocaldevice_bluez.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothlocaldevice_bluez.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothlocaldevice_bluez.cpp b/src/bluetooth/qbluetoothlocaldevice_bluez.cpp index 313a51b9..742f0b5a 100644 --- a/src/bluetooth/qbluetoothlocaldevice_bluez.cpp +++ b/src/bluetooth/qbluetoothlocaldevice_bluez.cpp @@ -360,6 +360,11 @@ void QBluetoothLocalDevicePrivate::initializeAdapter() } } +bool QBluetoothLocalDevicePrivate::isValid() const +{ + return adapter; +} + void QBluetoothLocalDevicePrivate::RequestConfirmation(const QDBusObjectPath &in0, uint in1) { Q_UNUSED(in0); |