diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-10-30 12:36:58 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-10-30 15:17:30 +0100 |
commit | ca3dc0a8d296c82f584c4c028d8dbc586c896300 (patch) | |
tree | 5705fee106c7ec1663cac0a4cd0ec93acf823564 /src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp | |
parent | a6c18d1babb2b38ade3d7a67c0a903701ef3ebf2 (diff) |
Add QBLuetoothDeviceDiscoveryAgent::UnsupportedPlatformError
iOS does not support classic Bluetooth device discovery. However since
iOS 5.0 it is possible to search for Bluetooth Low Energy devices. On
pre 5.0 devices tLE scan is not possible and this error enum is going
to be used.
In addition the enum is utilized by the default backend
which is used on unsupported Bluetooth platforms.
[ChangeLog][QtBluetooth][QBluetoothDeviceDiscoveryAgent] A new
UnsupportedPlatformError enum value added.
Change-Id: I74b85782ba1e8ac55798171151b364d5dc0aa79f
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp index c89c2d37..bacfeee1 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp @@ -43,11 +43,11 @@ QT_BEGIN_NAMESPACE QBluetoothDeviceDiscoveryAgentPrivate::QBluetoothDeviceDiscoveryAgentPrivate( const QBluetoothAddress &deviceAdapter, QBluetoothDeviceDiscoveryAgent *parent) - : q_ptr(parent) + : inquiryType(QBluetoothDeviceDiscoveryAgent::GeneralUnlimitedInquiry), + lastError(QBluetoothDeviceDiscoveryAgent::NoError), + q_ptr(parent) { Q_UNUSED(deviceAdapter); - inquiryType = QBluetoothDeviceDiscoveryAgent::GeneralUnlimitedInquiry; - lastError = QBluetoothDeviceDiscoveryAgent::NoError; } QBluetoothDeviceDiscoveryAgentPrivate::~QBluetoothDeviceDiscoveryAgentPrivate() @@ -62,9 +62,10 @@ bool QBluetoothDeviceDiscoveryAgentPrivate::isActive() const void QBluetoothDeviceDiscoveryAgentPrivate::start() { Q_Q(QBluetoothDeviceDiscoveryAgent); - lastError = QBluetoothDeviceDiscoveryAgent::InputOutputError; - errorString = QBluetoothDeviceDiscoveryAgent::tr("No Bluetooth device available"); - emit q->error(QBluetoothDeviceDiscoveryAgent::InputOutputError); + lastError = QBluetoothDeviceDiscoveryAgent::UnsupportedPlatformError; + errorString = QBluetoothDeviceDiscoveryAgent::tr("Device discovery on this platform not support"); + + emit q->error(lastError); } void QBluetoothDeviceDiscoveryAgentPrivate::stop() |