summaryrefslogtreecommitdiff
path: root/src/bluetooth/qbluetoothlocaldevice_p.h
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-06-27 17:43:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-28 08:39:01 +0200
commit42e8371600155bcff620929d5bf4dff998f3324f (patch)
treea0b89ad51f07f50eca28903212049423bddc58c5 /src/bluetooth/qbluetoothlocaldevice_p.h
parent06533c66b54f2ac9a9911e093723b71e27bd677d (diff)
downloadqtconnectivity-42e8371600155bcff620929d5bf4dff998f3324f.tar.gz
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_p.h')
-rw-r--r--src/bluetooth/qbluetoothlocaldevice_p.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothlocaldevice_p.h b/src/bluetooth/qbluetoothlocaldevice_p.h
index bb08945a..a88e6979 100644
--- a/src/bluetooth/qbluetoothlocaldevice_p.h
+++ b/src/bluetooth/qbluetoothlocaldevice_p.h
@@ -100,6 +100,7 @@ public Q_SLOTS: // METHODS
void pairingCompleted(QDBusPendingCallWatcher*);
void PropertyChanged(QString,QDBusVariant);
+ bool isValid() const;
private:
QDBusMessage msgConfirmation;
@@ -134,12 +135,20 @@ public:
Q_INVOKABLE void controlReply(ppsResult res);
Q_INVOKABLE void controlEvent(ppsResult res);
+ bool isValid() const;
+
private:
QBluetoothLocalDevice *q_ptr;
+ bool isValidDevice;
};
#else
class QBluetoothLocalDevicePrivate : public QObject
{
+public:
+ bool isValid() const
+ {
+ return false;
+ }
};
#endif