From 300248f446e1117b91d23ed13c49ec6bff568419 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 14 Feb 2022 12:52:02 -0800 Subject: [PATCH] Qt6: use the newer createCentral() API This will cause us problems when using Qt6 on Android - but I don't see this happening any time soon. Signed-off-by: Dirk Hohndel --- core/qt-ble.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/qt-ble.cpp b/core/qt-ble.cpp index ee951ffd7..a4f6f0b42 100644 --- a/core/qt-ble.cpp +++ b/core/qt-ble.cpp @@ -561,7 +561,7 @@ dc_status_t qt_ble_open(void **io, dc_context_t *, const char *devaddr, device_d // HACK ALERT! Qt 5.9 needs this for proper Bluez operation qputenv("QT_DEFAULT_CENTRAL_SERVICES", "1"); -#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) +#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) QBluetoothDeviceInfo remoteDevice = getBtDeviceInfo(QString(devaddr)); QLowEnergyController *controller = QLowEnergyController::createCentral(remoteDevice); #else