diff options
Diffstat (limited to 'src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp')
-rw-r--r-- | src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp index 47ea4b6d..97265b4f 100644 --- a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp +++ b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp @@ -135,36 +135,13 @@ void QDeclarativeBluetoothDiscoveryModel::componentComplete() void QDeclarativeBluetoothDiscoveryModel::errorDiscovery(QBluetoothServiceDiscoveryAgent::Error error) { - switch (error) { - case QBluetoothServiceDiscoveryAgent::DeviceDiscoveryError: - d->m_error = DeviceDiscoveryError; - break; - case QBluetoothServiceDiscoveryAgent::UnknownError: - d->m_error = UnknownError; - break; - default: - d->m_error = UnknownError; - break; - } + d->m_error = static_cast<QDeclarativeBluetoothDiscoveryModel::Error>(error); emit errorChanged(); } void QDeclarativeBluetoothDiscoveryModel::errorDeviceDiscovery(QBluetoothDeviceDiscoveryAgent::Error error) { - switch (error) { - case QBluetoothDeviceDiscoveryAgent::IOFailure: - d->m_error = IOFailure; - break; - case QBluetoothDeviceDiscoveryAgent::PoweredOff: - d->m_error = PoweredOffFailure; - break; - case QBluetoothDeviceDiscoveryAgent::UnknownError: - d->m_error = UnknownError; - break; - default: - d->m_error = UnknownError; - break; - } + d->m_error = static_cast<QDeclarativeBluetoothDiscoveryModel::Error>(error); emit errorChanged(); } @@ -185,13 +162,10 @@ void QDeclarativeBluetoothDiscoveryModel::clearModel() \header \li Property \li Description \row \li \c BluetoothDiscoveryModel.NoError \li No error occurred. - \row \li \c BluetoothDiscoveryModel.IOFailure + \row \li \c BluetoothDiscoveryModel.InputOutputError \li An IO failure occurred during device discovery - \row \li \c BluetoothDiscoveryModel.PoweredOffFailure + \row \li \c BluetoothDiscoveryModel.PoweredOffError \li The bluetooth device is not powered on. - \row \li \c BluetoothDiscoveryModel.DeviceDiscoveryError - \li In order to be able to discover services a device discovery is started first. - This error indicates that a problem detected there. \row \li \c BluetoothDiscoveryModel.UnknownError \li An unknown error occurred. \endtable |