diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-01-28 15:19:14 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-01-29 15:35:19 +0100 |
commit | 96cf13fe8e89f89247ed10c86521072da5d9ca40 (patch) | |
tree | fcfeeb887ac53f8dca04f924986a2116dadf77e8 | |
parent | 44f9f5a52f0c4a2ea3bc3a5b75f2ec0829f6ee95 (diff) | |
download | qtconnectivity-96cf13fe8e89f89247ed10c86521072da5d9ca40.tar.gz |
QLowEnergyController/Windows: Fix warning about ignored qualifiers
Replace const PBLUETOOTH_GATT_VALUE_CHANGED_EVENT by
const BLUETOOTH_GATT_VALUE_CHANGED_EVENT *, fixing:
qlowenergycontroller_win.cpp: In function 'void eventChangedCallbackEntry(BTH_LE_GATT_EVENT_TYPE, PVOID, PVOID)':
qlowenergycontroller_win.cpp:521:94: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
reinterpret_cast<const PBLUETOOTH_GATT_VALUE_CHANGED_EVENT>(eventOutParameter));
Fix the spelling error in the class name on this occasion.
Change-Id: Idff4eba4ba8cac74002be9fa54594f96393fa3fa
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/bluetooth/qlowenergycontroller_win.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bluetooth/qlowenergycontroller_win.cpp b/src/bluetooth/qlowenergycontroller_win.cpp index ced69685..479f81ce 100644 --- a/src/bluetooth/qlowenergycontroller_win.cpp +++ b/src/bluetooth/qlowenergycontroller_win.cpp @@ -62,13 +62,13 @@ Q_GLOBAL_STATIC(QLibrary, bluetoothapis) Q_GLOBAL_STATIC(QVector<QLowEnergyControllerPrivateWin32 *>, qControllers) static QMutex controllersGuard(QMutex::NonRecursive); -const QEvent::Type CharactericticValueEventType = static_cast<QEvent::Type>(QEvent::User + 1); +const QEvent::Type CharacteristicValueEventType = static_cast<QEvent::Type>(QEvent::User + 1); -class CharactericticValueEvent : public QEvent +class CharacteristicValueEvent : public QEvent { public: - explicit CharactericticValueEvent(const PBLUETOOTH_GATT_VALUE_CHANGED_EVENT gattValueChangedEvent) - : QEvent(CharactericticValueEventType) + explicit CharacteristicValueEvent(const BLUETOOTH_GATT_VALUE_CHANGED_EVENT *gattValueChangedEvent) + : QEvent(CharacteristicValueEventType) , m_handle(0) { if (!gattValueChangedEvent || gattValueChangedEvent->CharacteristicValueDataSize == 0) @@ -517,8 +517,8 @@ static void WINAPI eventChangedCallbackEntry( if (!qControllers->contains(target)) return; - CharactericticValueEvent *e = new CharactericticValueEvent( - reinterpret_cast<const PBLUETOOTH_GATT_VALUE_CHANGED_EVENT>(eventOutParameter)); + CharacteristicValueEvent *e = new CharacteristicValueEvent( + reinterpret_cast<const BLUETOOTH_GATT_VALUE_CHANGED_EVENT *>(eventOutParameter)); QCoreApplication::postEvent(target, e); } @@ -668,11 +668,11 @@ static BTH_LE_GATT_DESCRIPTOR recoverNativeLeGattDescriptor( void QLowEnergyControllerPrivateWin32::customEvent(QEvent *e) { - if (e->type() != CharactericticValueEventType) + if (e->type() != CharacteristicValueEventType) return; - const CharactericticValueEvent *characteristicEvent - = static_cast<CharactericticValueEvent *>(e); + const CharacteristicValueEvent *characteristicEvent + = static_cast<CharacteristicValueEvent *>(e); updateValueOfCharacteristic(characteristicEvent->m_handle, characteristicEvent->m_value, false); |