diff options
-rw-r--r-- | dist/changes-5.12.4 | 2 | ||||
-rw-r--r-- | dist/changes-5.12.5 | 38 | ||||
-rw-r--r-- | dist/changes-5.13.1 | 36 | ||||
-rw-r--r-- | src/bluetooth/android/localdevicebroadcastreceiver.cpp | 12 | ||||
-rw-r--r-- | src/bluetooth/doc/src/bluetooth-overview.qdoc | 7 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp | 5 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothlocaldevice_android.cpp | 11 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothlocaldevice_osx.mm | 2 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothlocaldevice_p.h | 2 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothlocaldevice_winrt.cpp | 2 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothtransferreply_osx.mm | 10 | ||||
-rw-r--r-- | src/bluetooth/qlowenergycontroller_android.cpp | 2 | ||||
-rw-r--r-- | src/bluetooth/qlowenergycontroller_bluezdbus.cpp | 4 |
13 files changed, 106 insertions, 27 deletions
diff --git a/dist/changes-5.12.4 b/dist/changes-5.12.4 index cb7ef2bf..d751f704 100644 --- a/dist/changes-5.12.4 +++ b/dist/changes-5.12.4 @@ -18,7 +18,7 @@ Each of these identifiers can be entered in the bug tracker to obtain more information about a particular change. **************************************************************************** -* Qt 5.12.3 Changes * +* Qt 5.12.4 Changes * **************************************************************************** QtBluetooth diff --git a/dist/changes-5.12.5 b/dist/changes-5.12.5 new file mode 100644 index 00000000..9f0b41b1 --- /dev/null +++ b/dist/changes-5.12.5 @@ -0,0 +1,38 @@ +Qt 5.12.5 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.4. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.12.5 Changes * +**************************************************************************** + +QtBluetooth +----------- + + - [QTBUG-76847] Fixed ambiguous type conversions on Apple platforms. + + - [QTBUG-75089] Removed attempt to delete nullptr on WinRT when calling + QBluetoothDeviceDiscoveryAgent::stop(). + + - [QTBUG-76565] Reverted handling of PAIRING_VARIANT_PIN by + QBluetoothLocalDevice on Android. + + - [QTBUG-62520] Improved documentation covering platform limitations on WinRT. + + - Fixed QLowEnergyAdvertisingData::setManufacturerData() on Android. Previously a wrong + JNI signature prevented setting the data. diff --git a/dist/changes-5.13.1 b/dist/changes-5.13.1 new file mode 100644 index 00000000..706bd31d --- /dev/null +++ b/dist/changes-5.13.1 @@ -0,0 +1,36 @@ +Qt 5.13.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.13.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.13 series is binary compatible with the 5.12.x series. +Applications compiled for 5.12 will continue to run with 5.13. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.13.1 Changes * +**************************************************************************** + +QtBluetooth +----------- + + - [QTBUG-62520] Improved stability of QBluetoothSocket::connectToService() + on WinRT. + + - [QTBUG-62294] Added implementation for QBluetoothLocalSocket on WinRT. Note + that the platform only supports pairingStatus() related features. + + - Improved stability of QLowEnergyController on WinRT. + + - [QTBUG-75907] Reduced number of asserts in QLowEnergyController on WinRT. + diff --git a/src/bluetooth/android/localdevicebroadcastreceiver.cpp b/src/bluetooth/android/localdevicebroadcastreceiver.cpp index e3b01987..78aecc12 100644 --- a/src/bluetooth/android/localdevicebroadcastreceiver.cpp +++ b/src/bluetooth/android/localdevicebroadcastreceiver.cpp @@ -189,6 +189,14 @@ void LocalDeviceBroadcastReceiver::onReceive(JNIEnv *env, jobject context, jobje return; case 0: //BluetoothDevice.PAIRING_VARIANT_PIN { + qCDebug(QT_BT_ANDROID) << "Pairing : PAIRING_VARIANT_PIN -> use Android default handling"; + + // The section below is disabled because this Android pairing variant + // requires the user to enter a pin. Since QBluetoothLocalDevice does + // not have a setPin() equivalent which might be used to return the user's value. + // For now we ignore this request. If an app ignores such requests, + // Android shows a "fall-back" pin code entry form. + /* //generate a random key const QString pin = QStringLiteral("%1").arg(QRandomGenerator::global()->bounded(1000000), 6, 10, QLatin1Char('0')); @@ -225,10 +233,12 @@ void LocalDeviceBroadcastReceiver::onReceive(JNIEnv *env, jobject context, jobje } const QBluetoothAddress address(bluetoothDevice.callObjectMethod<jstring>("getAddress").toString()); - emit pairingDisplayPinCode(address, pin); + emit pairingDisplayPinCode(address, pin);*/ + break; } case 2: //BluetoothDevice.PAIRING_VARIANT_PASSKEY_CONFIRMATION { + qCDebug(QT_BT_ANDROID) << "Pairing : PAIRING_VARIANT_PASSKEY_CONFIRMATION"; keyExtra = valueForStaticField(JavaNames::BluetoothDevice, JavaNames::ExtraPairingKey); key = intentObject.callMethod<jint>("getIntExtra", diff --git a/src/bluetooth/doc/src/bluetooth-overview.qdoc b/src/bluetooth/doc/src/bluetooth-overview.qdoc index 902a13b7..33ccaa33 100644 --- a/src/bluetooth/doc/src/bluetooth-overview.qdoc +++ b/src/bluetooth/doc/src/bluetooth-overview.qdoc @@ -47,7 +47,12 @@ \li Receive advertisement from Bluetooth Low Energy device. \endlist - Note that the Object Push Profile is not supported on Android. + Note that the Object Push Profile is not supported on Android and Windows. + + Note that parts of RFCOMM functionality cannot be configured by Qt on Windows. + A service's \l {ServiceClassIds} and \l {ProtocolDescriptorList} are filled automatically by + Windows. Therefore registering a service with custom values for these fields might not yield the + expected result on Windows. Note that the Received Signal Strength Indicator (RSSI), as well as the Manufacturer Specific Data advertised by Bluetooth LE devices are diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp index 3407d280..5376ad2f 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp @@ -52,6 +52,7 @@ #include <QtCore/QLoggingCategory> #include <QtCore/qmutex.h> #include <QtCore/private/qeventdispatcher_winrt_p.h> +#include <QtCore/qmutex.h> #include <robuffer.h> #include <wrl.h> @@ -866,10 +867,8 @@ void QBluetoothDeviceDiscoveryAgentPrivate::stop() disconnectAndClearWorker(); emit q->canceled(); } - if (leScanTimer) { + if (leScanTimer) leScanTimer->stop(); - worker->deleteLater(); - } } void QBluetoothDeviceDiscoveryAgentPrivate::registerDevice(const QBluetoothDeviceInfo &info) diff --git a/src/bluetooth/qbluetoothlocaldevice_android.cpp b/src/bluetooth/qbluetoothlocaldevice_android.cpp index 40e4c2d4..2995d368 100644 --- a/src/bluetooth/qbluetoothlocaldevice_android.cpp +++ b/src/bluetooth/qbluetoothlocaldevice_android.cpp @@ -69,8 +69,6 @@ QBluetoothLocalDevicePrivate::QBluetoothLocalDevicePrivate( this, &QBluetoothLocalDevicePrivate::processConnectDeviceChanges); connect(receiver, &LocalDeviceBroadcastReceiver::pairingDisplayConfirmation, this, &QBluetoothLocalDevicePrivate::processDisplayConfirmation); - connect(receiver, &LocalDeviceBroadcastReceiver::pairingDisplayPinCode, - this, &QBluetoothLocalDevicePrivate::processDisplayPinCode); } QBluetoothLocalDevicePrivate::~QBluetoothLocalDevicePrivate() @@ -206,15 +204,6 @@ void QBluetoothLocalDevicePrivate::processDisplayConfirmation(const QBluetoothAd return; emit q_ptr->pairingDisplayConfirmation(address, pin); -} - -void QBluetoothLocalDevicePrivate::processDisplayPinCode(const QBluetoothAddress &address, const QString &pin) -{ - // only send pairing notification for pairing requests issued by - // this QBluetoothLocalDevice instance - if (pendingPairing(address) == -1) - return; - emit q_ptr->pairingDisplayPinCode(address, pin); } diff --git a/src/bluetooth/qbluetoothlocaldevice_osx.mm b/src/bluetooth/qbluetoothlocaldevice_osx.mm index 52b7bba8..e7dd9906 100644 --- a/src/bluetooth/qbluetoothlocaldevice_osx.mm +++ b/src/bluetooth/qbluetoothlocaldevice_osx.mm @@ -149,7 +149,7 @@ QBluetoothLocalDevicePrivate::QBluetoothLocalDevicePrivate(QBluetoothLocalDevice bool QBluetoothLocalDevicePrivate::isValid() const { - return hostController; + return hostController.data(); } void QBluetoothLocalDevicePrivate::requestPairing(const QBluetoothAddress &address, Pairing pairing) diff --git a/src/bluetooth/qbluetoothlocaldevice_p.h b/src/bluetooth/qbluetoothlocaldevice_p.h index 28e7ed53..d86ab22f 100644 --- a/src/bluetooth/qbluetoothlocaldevice_p.h +++ b/src/bluetooth/qbluetoothlocaldevice_p.h @@ -129,7 +129,6 @@ private slots: QBluetoothLocalDevice::Pairing pairing); void processConnectDeviceChanges(const QBluetoothAddress &address, bool isConnectEvent); void processDisplayConfirmation(const QBluetoothAddress &address, const QString &pin); - void processDisplayPinCode(const QBluetoothAddress &address, const QString &pin); private: QBluetoothLocalDevice *q_ptr; @@ -254,6 +253,7 @@ class QBluetoothLocalDevicePrivate : public QObject public: QBluetoothLocalDevicePrivate(QBluetoothLocalDevice *q, QBluetoothAddress = QBluetoothAddress()); + ~QBluetoothLocalDevicePrivate(); bool isValid() const; diff --git a/src/bluetooth/qbluetoothlocaldevice_winrt.cpp b/src/bluetooth/qbluetoothlocaldevice_winrt.cpp index ae794db0..6e8b1966 100644 --- a/src/bluetooth/qbluetoothlocaldevice_winrt.cpp +++ b/src/bluetooth/qbluetoothlocaldevice_winrt.cpp @@ -114,6 +114,8 @@ QBluetoothLocalDevicePrivate::QBluetoothLocalDevicePrivate(QBluetoothLocalDevice GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Devices_Bluetooth_BluetoothDevice).Get(), &mStatics); } +QBluetoothLocalDevicePrivate::~QBluetoothLocalDevicePrivate() = default; + bool QBluetoothLocalDevicePrivate::isValid() const { return (mStatics != nullptr && mLEStatics != nullptr); diff --git a/src/bluetooth/qbluetoothtransferreply_osx.mm b/src/bluetooth/qbluetoothtransferreply_osx.mm index 65c8f82d..40a747f8 100644 --- a/src/bluetooth/qbluetoothtransferreply_osx.mm +++ b/src/bluetooth/qbluetoothtransferreply_osx.mm @@ -136,13 +136,13 @@ QBluetoothTransferReplyOSXPrivate::~QBluetoothTransferReplyOSXPrivate() // The OBEX session will be closed then. If // somehow IOBluetooth/OBEX still has a reference to our // session, it will not call any of delegate's callbacks. - if (session) + if (session.data()) [session closeSession]; } bool QBluetoothTransferReplyOSXPrivate::isActive() const { - return agent || (session && [session hasActiveRequest]); + return agent.data() || (session.data() && [session hasActiveRequest]); } bool QBluetoothTransferReplyOSXPrivate::startOPP(const QBluetoothAddress &device) @@ -218,7 +218,7 @@ void QBluetoothTransferReplyOSXPrivate::sendConnect(const QBluetoothAddress &dev void QBluetoothTransferReplyOSXPrivate::sendPut() { Q_ASSERT_X(inputStream, Q_FUNC_INFO, "invalid input stream (null)"); - Q_ASSERT_X(session, Q_FUNC_INFO, "invalid OBEX session (nil)"); + Q_ASSERT_X(session.data(), Q_FUNC_INFO, "invalid OBEX session (nil)"); Q_ASSERT_X([session isConnected], Q_FUNC_INFO, "not connected"); Q_ASSERT_X(![session hasActiveRequest], Q_FUNC_INFO, "session already has an active request"); @@ -268,7 +268,7 @@ void QBluetoothTransferReplyOSXPrivate::OBEXConnectError(OBEXError errorCode, OB Q_UNUSED(errorCode) Q_UNUSED(response) - if (session) { + if (session.data()) { setReplyError(QBluetoothTransferReply::SessionError, QCoreApplication::translate(TRANSFER_REPLY, TR_CONNECT_FAILED)); } else { @@ -283,7 +283,7 @@ void QBluetoothTransferReplyOSXPrivate::OBEXConnectError(OBEXError errorCode, OB void QBluetoothTransferReplyOSXPrivate::OBEXConnectSuccess() { // Now that OBEX connect succeeded, we can send an OBEX put request. - if (!session) { + if (!session.data()) { // We're still in OBEXConnect(), it'll take care of next steps. return; } diff --git a/src/bluetooth/qlowenergycontroller_android.cpp b/src/bluetooth/qlowenergycontroller_android.cpp index 35d943fc..86e6ade7 100644 --- a/src/bluetooth/qlowenergycontroller_android.cpp +++ b/src/bluetooth/qlowenergycontroller_android.cpp @@ -940,7 +940,7 @@ static QAndroidJniObject createJavaAdvertiseData(const QLowEnergyAdvertisingData env->SetByteArrayRegion(nativeData, 0, nativeSize, reinterpret_cast<const jbyte*>(data.manufacturerData().constData())); builder = builder.callObjectMethod("addManufacturerData", - "(I[B])Landroid/bluetooth/le/AdvertiseData$Builder;", + "(I[B)Landroid/bluetooth/le/AdvertiseData$Builder;", data.manufacturerId(), nativeData); env->DeleteLocalRef(nativeData); diff --git a/src/bluetooth/qlowenergycontroller_bluezdbus.cpp b/src/bluetooth/qlowenergycontroller_bluezdbus.cpp index 4e5f3430..2a0fafdf 100644 --- a/src/bluetooth/qlowenergycontroller_bluezdbus.cpp +++ b/src/bluetooth/qlowenergycontroller_bluezdbus.cpp @@ -340,7 +340,7 @@ void QLowEnergyControllerPrivateBluezDBus::connectToDevice() QDBusPendingReply<> reply = device->Connect(); QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher(reply, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, - [=](QDBusPendingCallWatcher* call) { + [this](QDBusPendingCallWatcher* call) { QDBusPendingReply<> reply = *call; if (reply.isError()) { qCDebug(QT_BT_BLUEZ) << "BTLE_DBUS::connect() failed" @@ -362,7 +362,7 @@ void QLowEnergyControllerPrivateBluezDBus::disconnectFromDevice() QDBusPendingReply<> reply = device->Disconnect(); QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher(reply, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, - [=](QDBusPendingCallWatcher* call) { + [this](QDBusPendingCallWatcher* call) { QDBusPendingReply<> reply = *call; if (reply.isError()) { qCDebug(QT_BT_BLUEZ) << "BTLE_DBUS::disconnect() failed" |