Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package qt6-connectivity for
openSUSE:Factory checked in at 2025-02-03 21:40:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qt6-connectivity (Old)
and /work/SRC/openSUSE:Factory/.qt6-connectivity.new.2316 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-connectivity"
Mon Feb 3 21:40:50 2025 rev:30 rq:1242043 version:6.8.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/qt6-connectivity/qt6-connectivity.changes
2025-01-25 19:09:56.930430964 +0100
+++
/work/SRC/openSUSE:Factory/.qt6-connectivity.new.2316/qt6-connectivity.changes
2025-02-03 21:40:56.248082771 +0100
@@ -1,0 +2,8 @@
+Fri Jan 31 10:22:53 UTC 2025 - Christophe Marin <[email protected]>
+
+- Update to 6.8.2
+ https://www.qt.io/blog/qt-6.8.2-released
+- Drop patch, merged upstream:
+ * 0001-QLowEnergyControllerPrivateBluez-guard-against-malfo.patch
+
+-------------------------------------------------------------------
Old:
----
0001-QLowEnergyControllerPrivateBluez-guard-against-malfo.patch
qtconnectivity-everywhere-src-6.8.1.tar.xz
New:
----
qtconnectivity-everywhere-src-6.8.2.tar.xz
BETA DEBUG BEGIN:
Old:- Drop patch, merged upstream:
* 0001-QLowEnergyControllerPrivateBluez-guard-against-malfo.patch
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qt6-connectivity.spec ++++++
--- /var/tmp/diff_new_pack.xn8TIn/_old 2025-02-03 21:40:57.008114272 +0100
+++ /var/tmp/diff_new_pack.xn8TIn/_new 2025-02-03 21:40:57.008114272 +0100
@@ -16,7 +16,7 @@
#
-%define real_version 6.8.1
+%define real_version 6.8.2
%define short_version 6.8
%define tar_name qtconnectivity-everywhere-src
%define tar_suffix %{nil}
@@ -27,15 +27,13 @@
%endif
#
Name: qt6-connectivity%{?pkg_suffix}
-Version: 6.8.1
+Version: 6.8.2
Release: 0
Summary: Qt 6 connectivity tools and libraries
License: GPL-2.0-only OR LGPL-3.0-only OR GPL-3.0-only
URL: https://www.qt.io
Source0:
https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz
Source99: qt6-connectivity-rpmlintrc
-# PATCH-FIX-UPSTREAM
-Patch0: 0001-QLowEnergyControllerPrivateBluez-guard-against-malfo.patch
BuildRequires: pkgconfig
BuildRequires: qt6-core-private-devel
BuildRequires: qt6-network-private-devel
++++++ qtconnectivity-everywhere-src-6.8.1.tar.xz ->
qtconnectivity-everywhere-src-6.8.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.8.1/.cmake.conf
new/qtconnectivity-everywhere-src-6.8.2/.cmake.conf
--- old/qtconnectivity-everywhere-src-6.8.1/.cmake.conf 2024-11-21
04:34:01.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/.cmake.conf 2025-01-24
10:12:03.000000000 +0100
@@ -1,4 +1,4 @@
-set(QT_REPO_MODULE_VERSION "6.8.1")
+set(QT_REPO_MODULE_VERSION "6.8.2")
set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1")
list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.8.1/.tag
new/qtconnectivity-everywhere-src-6.8.2/.tag
--- old/qtconnectivity-everywhere-src-6.8.1/.tag 2024-11-21
04:34:01.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/.tag 2025-01-24
10:12:03.000000000 +0100
@@ -1 +1 @@
-c98e9bfee39f85914b7e7fb0ee991a2ac681f365
+7f522528d58507931237500ffae7612d6c4b8725
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.8.1/CMakeLists.txt
new/qtconnectivity-everywhere-src-6.8.2/CMakeLists.txt
--- old/qtconnectivity-everywhere-src-6.8.1/CMakeLists.txt 2024-11-21
04:34:01.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/CMakeLists.txt 2025-01-24
10:12:03.000000000 +0100
@@ -12,7 +12,7 @@
)
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals
Core Network)
-find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS
+find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS
DBus Gui Widgets Quick QuickControls2)
qt_internal_project_setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.8.1/REUSE.toml
new/qtconnectivity-everywhere-src-6.8.2/REUSE.toml
--- old/qtconnectivity-everywhere-src-6.8.1/REUSE.toml 1970-01-01
01:00:00.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/REUSE.toml 2025-01-24
10:12:03.000000000 +0100
@@ -0,0 +1,59 @@
+version = 1
+
+[[annotations]]
+path = ["tests/**.ui", "tests/**.txt", "tests/**.nfc"]
+precedence = "closest"
+comment = "test"
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR GPL-3.0-only"
+
+[[annotations]]
+path = ["src/android/bluetooth/AndroidManifest.xml",
+ "src/android/nfc/AndroidManifest.xml"]
+precedence = "closest"
+comment = "modile anf plugins"
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR LGPL-3.0-only OR
GPL-2.0-only OR GPL-3.0-only"
+
+[[annotations]]
+path = ["**.pro", ".cmake.conf", "**.yaml", "**.json", "**.cfg", "**.plist"]
+precedence = "closest"
+comment = "build system"
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "BSD-3-Clause"
+
+[[annotations]]
+path = [".tag", "**/.gitattributes", "**.gitignore"]
+precedence = "closest"
+comment = "build system"
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "BSD-3-Clause"
+
+[[annotations]]
+path = ["**/doc/images/**", "examples/**"]
+comment = "this must be after the build system table because example and
snippets take precedence over build system"
+precedence = "closest"
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR BSD-3-Clause"
+
+[[annotations]]
+path = ["**/README*", "**.qdocconf", "src/nfc/ApiChangesQt6.txt"]
+comment = "documentation"
+precedence = "closest"
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR
GFDL-1.3-no-invariants-only"
+
+[[annotations]]
+path = ["**.toml", "licenseRule.json"]
+comment = "documentation"
+precedence = "override"
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR
GFDL-1.3-no-invariants-only"
+
+[[annotations]]
+path = ["**/qt_attribution.json"]
+comment = "documentation"
+precedence = "override"
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR
GFDL-1.3-no-invariants-only"
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/dependencies.yaml
new/qtconnectivity-everywhere-src-6.8.2/dependencies.yaml
--- old/qtconnectivity-everywhere-src-6.8.1/dependencies.yaml 2024-11-21
04:34:01.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/dependencies.yaml 2025-01-24
10:12:03.000000000 +0100
@@ -1,7 +1,7 @@
dependencies:
../qtbase:
- ref: 0db4321f2f13c6870283f3fcc0f1a462fd7cf663
+ ref: f1136de66638060b8a1ab9bc0cdf1a91dcb5ec01
required: true
../qtdeclarative:
- ref: b34fca34941ecdbf99819bbf58b45332ac9e6fa7
+ ref: 75534f3e7fff24ed7ccb364e2ed9950a73da879f
required: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.8.1/dist/REUSE.toml
new/qtconnectivity-everywhere-src-6.8.2/dist/REUSE.toml
--- old/qtconnectivity-everywhere-src-6.8.1/dist/REUSE.toml 1970-01-01
01:00:00.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/dist/REUSE.toml 2025-01-24
10:12:03.000000000 +0100
@@ -0,0 +1,8 @@
+version = 1
+
+[[annotations]]
+path = ["*"]
+precedence = "override"
+comment = "Licensed as documentation."
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR
GFDL-1.3-no-invariants-only"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/examples/bluetooth/shared/Info.cmake.ios.plist
new/qtconnectivity-everywhere-src-6.8.2/examples/bluetooth/shared/Info.cmake.ios.plist
---
old/qtconnectivity-everywhere-src-6.8.1/examples/bluetooth/shared/Info.cmake.ios.plist
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/examples/bluetooth/shared/Info.cmake.ios.plist
2025-01-24 10:12:03.000000000 +0100
@@ -10,6 +10,10 @@
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+ <key>CFBundleName</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
+ <key>CFBundleDisplayName</key>
+ <string>${QT_INTERNAL_DOLLAR_VAR}{PRODUCT_NAME}</string>
<key>CFBundleVersion</key>
<string>0.0.1</string>
<key>CFBundleShortVersionString</key>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/examples/nfc/ndefeditor/icons/ndefeditor/REUSE.toml
new/qtconnectivity-everywhere-src-6.8.2/examples/nfc/ndefeditor/icons/ndefeditor/REUSE.toml
---
old/qtconnectivity-everywhere-src-6.8.1/examples/nfc/ndefeditor/icons/ndefeditor/REUSE.toml
1970-01-01 01:00:00.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/examples/nfc/ndefeditor/icons/ndefeditor/REUSE.toml
2025-01-24 10:12:03.000000000 +0100
@@ -0,0 +1,7 @@
+version = 1
+
+[[annotations]]
+path = ["20x20/*", "20x20@2/*", "20x20@3/*", "20x20@4/*"]
+precedence = "closest"
+SPDX-FileCopyrightText = "Copyright 2018 Google, Inc. All Rights Reserved."
+SPDX-License-Identifier = "Apache-2.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconnectivity-everywhere-src-6.8.1/licenseRule.json
new/qtconnectivity-everywhere-src-6.8.2/licenseRule.json
--- old/qtconnectivity-everywhere-src-6.8.1/licenseRule.json 2024-11-21
04:34:01.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/licenseRule.json 2025-01-24
10:12:03.000000000 +0100
@@ -88,6 +88,11 @@
"comment" : "Default",
"file type" : "build system",
"spdx" : ["BSD-3-Clause"]
+ },
+ "src/bluetooth/bluez/generate" : {
+ "comment" : "Default",
+ "file type" : "build system",
+ "spdx" : ["BSD-3-Clause"]
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothGattCharacteristic.java
new/qtconnectivity-everywhere-src-6.8.2/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothGattCharacteristic.java
---
old/qtconnectivity-everywhere-src-6.8.1/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothGattCharacteristic.java
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothGattCharacteristic.java
2025-01-24 10:12:03.000000000 +0100
@@ -23,6 +23,7 @@
// be somewhat complicated. This should be safe as all accesses to this
class are synchronized.
// For clarity: For API levels below 33 we still need to use the
setValue() of the base class
// because Android internally uses getValue() with APIs below 33.
+ @SuppressWarnings("deprecation")
boolean setLocalValue(byte[] value) {
if (Build.VERSION.SDK_INT >= 33) {
m_localValue = value;
@@ -32,6 +33,7 @@
}
}
+ @SuppressWarnings("deprecation")
byte[] getLocalValue()
{
if (Build.VERSION.SDK_INT >= 33)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothGattDescriptor.java
new/qtconnectivity-everywhere-src-6.8.2/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothGattDescriptor.java
---
old/qtconnectivity-everywhere-src-6.8.1/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothGattDescriptor.java
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothGattDescriptor.java
2025-01-24 10:12:03.000000000 +0100
@@ -18,6 +18,7 @@
// be somewhat complicated. This should be safe as all accesses to this
class are synchronized.
// For clarity: For API levels below 33 we still need to use the
setValue() of the base class
// because Android internally uses getValue() with APIs below 33.
+ @SuppressWarnings("deprecation")
boolean setLocalValue(byte[] value) {
if (Build.VERSION.SDK_INT >= 33) {
m_localValue = value;
@@ -27,6 +28,7 @@
}
}
+ @SuppressWarnings("deprecation")
byte[] getLocalValue()
{
if (Build.VERSION.SDK_INT >= 33)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLE.java
new/qtconnectivity-everywhere-src-6.8.2/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLE.java
---
old/qtconnectivity-everywhere-src-6.8.1/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLE.java
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLE.java
2025-01-24 10:12:03.000000000 +0100
@@ -47,7 +47,7 @@
private BluetoothGatt mBluetoothGatt = null;
private HandlerThread mHandlerThread = null;
private Handler mHandler = null;
- private Constructor mCharacteristicConstructor = null;
+ private Constructor<BluetoothGattCharacteristic>
mCharacteristicConstructor = null;
private String mRemoteGattAddress;
private final UUID clientCharacteristicUuid =
UUID.fromString("00002902-0000-1000-8000-00805f9b34fb");
private final int MAX_MTU = 512;
@@ -113,7 +113,7 @@
if (mBluetoothGatt == null)
return;
- final BluetoothDevice device =
intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+ final BluetoothDevice device = getDevice(intent);
if (device == null ||
!device.getAddress().equals(mBluetoothGatt.getDevice().getAddress()))
return;
@@ -155,6 +155,15 @@
}
}
+ @SuppressWarnings("deprecation")
+ private static BluetoothDevice getDevice(Intent intent)
+ {
+ if (Build.VERSION.SDK_INT >= 33)
+ return intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE,
BluetoothDevice.class);
+
+ return intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+ }
+
private class BondStateBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
@@ -659,8 +668,9 @@
}
- @Override
// API < 33
+ @Override
+ @SuppressWarnings("deprecation")
public void onCharacteristicRead(android.bluetooth.BluetoothGatt gatt,
android.bluetooth.BluetoothGattCharacteristic characteristic,
int status)
@@ -669,8 +679,8 @@
handleOnCharacteristicRead(gatt, characteristic,
characteristic.getValue(), status);
}
- @Override
// API >= 33
+ @Override
public void onCharacteristicRead(android.bluetooth.BluetoothGatt gatt,
android.bluetooth.BluetoothGattCharacteristic characteristic,
byte[] value,
@@ -692,6 +702,7 @@
// API < 33
@Override
+ @SuppressWarnings("deprecation")
public void onCharacteristicChanged(android.bluetooth.BluetoothGatt
gatt,
android.bluetooth.BluetoothGattCharacteristic characteristic)
{
@@ -712,6 +723,7 @@
// API < 33
@Override
+ @SuppressWarnings("deprecation")
public void onDescriptorRead(android.bluetooth.BluetoothGatt gatt,
android.bluetooth.BluetoothGattDescriptor
descriptor,
int status)
@@ -816,7 +828,7 @@
handlerThread.start();
mHandler = new Handler(handlerThread.getLooper());
- Class[] args = new Class[6];
+ Class<?>[] args = new Class<?>[6];
args[0] = android.content.Context.class;
args[1] = boolean.class;
args[2] = android.bluetooth.BluetoothGattCallback.class;
@@ -846,7 +858,7 @@
try {
//This API element is currently: greylist-max-o (API level
27), reflection, allowed
//It may change in the future
- Class[] constr_args = new Class[5];
+ Class<?>[] constr_args = new Class<?>[5];
constr_args[0] = android.bluetooth.BluetoothGattService.class;
constr_args[1] = java.util.UUID.class;
constr_args[2] = int.class;
@@ -1643,14 +1655,40 @@
private BluetoothGattCharacteristic
cloneChararacteristic(BluetoothGattCharacteristic other) {
try {
- return (BluetoothGattCharacteristic)
mCharacteristicConstructor.newInstance(other.getService(),
- other.getUuid(), other.getInstanceId(),
other.getProperties(), other.getPermissions());
+ return mCharacteristicConstructor.newInstance(other.getService(),
other.getUuid(),
+ other.getInstanceId(), other.getProperties(),
other.getPermissions());
} catch (Exception ex) {
Log.w(TAG, "Cloning characteristic failed!" + ex);
return null;
}
}
+ // API level < 33
+ @SuppressWarnings("deprecation")
+ private boolean executeCharacteristicWriteJob(ReadWriteJob nextJob) {
+ if (mHandler != null || mCharacteristicConstructor == null) {
+ if (nextJob.entry.characteristic.getWriteType() !=
nextJob.requestedWriteType) {
+
nextJob.entry.characteristic.setWriteType(nextJob.requestedWriteType);
+ }
+ return !nextJob.entry.characteristic.setValue(nextJob.newValue)
+ ||
!mBluetoothGatt.writeCharacteristic(nextJob.entry.characteristic);
+ } else {
+ BluetoothGattCharacteristic orig = nextJob.entry.characteristic;
+ BluetoothGattCharacteristic tmp = cloneChararacteristic(orig);
+ if (tmp == null)
+ return true;
+ tmp.setWriteType(nextJob.requestedWriteType);
+ return !tmp.setValue(nextJob.newValue) ||
!mBluetoothGatt.writeCharacteristic(tmp);
+ }
+ }
+
+ // API level < 33
+ @SuppressWarnings("deprecation")
+ private boolean executeDescriptorWriteJob(ReadWriteJob nextJob) {
+ return !nextJob.entry.descriptor.setValue(nextJob.newValue)
+ || !mBluetoothGatt.writeDescriptor(nextJob.entry.descriptor);
+ }
+
// Returns true if nextJob should be skipped.
private boolean executeWriteJob(ReadWriteJob nextJob)
{
@@ -1662,20 +1700,7 @@
nextJob.entry.characteristic, nextJob.newValue,
nextJob.requestedWriteType);
return (writeResult != BluetoothStatusCodes.SUCCESS);
}
- if (mHandler != null || mCharacteristicConstructor == null) {
- if (nextJob.entry.characteristic.getWriteType() !=
nextJob.requestedWriteType) {
-
nextJob.entry.characteristic.setWriteType(nextJob.requestedWriteType);
- }
- result =
nextJob.entry.characteristic.setValue(nextJob.newValue);
- return !result ||
!mBluetoothGatt.writeCharacteristic(nextJob.entry.characteristic);
- } else {
- BluetoothGattCharacteristic orig =
nextJob.entry.characteristic;
- BluetoothGattCharacteristic tmp =
cloneChararacteristic(orig);
- if (tmp == null)
- return true;
- tmp.setWriteType(nextJob.requestedWriteType);
- return !tmp.setValue(nextJob.newValue) ||
!mBluetoothGatt.writeCharacteristic(tmp);
- }
+ return executeCharacteristicWriteJob(nextJob);
case Descriptor:
if
(nextJob.entry.descriptor.getUuid().compareTo(clientCharacteristicUuid) == 0) {
/*
@@ -1718,11 +1743,7 @@
nextJob.entry.descriptor,
nextJob.newValue);
return (writeResult != BluetoothStatusCodes.SUCCESS);
}
- result = nextJob.entry.descriptor.setValue(nextJob.newValue);
- if (!result ||
!mBluetoothGatt.writeDescriptor(nextJob.entry.descriptor))
- return true;
-
- break;
+ return executeDescriptorWriteJob(nextJob);
case Service:
case CharacteristicValue:
return true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLEServer.java
new/qtconnectivity-everywhere-src-6.8.2/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLEServer.java
---
old/qtconnectivity-everywhere-src-6.8.1/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLEServer.java
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/android/bluetooth/src/org/qtproject/qt/android/bluetooth/QtBluetoothLEServer.java
2025-01-24 10:12:03.000000000 +0100
@@ -806,6 +806,15 @@
}
}
+ // API-level < 33
+ @SuppressWarnings("deprecation")
+ private void notifyCharacteristicChange(BluetoothDevice device,
+ BluetoothGattCharacteristic
characteristic,
+ boolean confirm)
+ {
+ mGattServer.notifyCharacteristicChanged(device, characteristic,
confirm);
+ }
+
/*
Check the client characteristics configuration for the given
characteristic
and sends notifications or indications as per required.
@@ -832,7 +841,7 @@
mGattServer.notifyCharacteristicChanged(device,
characteristic, false,
((QtBluetoothGattCharacteristic)characteristic).getLocalValue());
} else {
- mGattServer.notifyCharacteristicChanged(device,
characteristic, false);
+ notifyCharacteristicChange(device, characteristic,
false);
}
} else if (Arrays.equals(clientCharacteristicConfig,
BluetoothGattDescriptor.ENABLE_INDICATION_VALUE)) {
@@ -840,7 +849,7 @@
mGattServer.notifyCharacteristicChanged(device,
characteristic, true,
((QtBluetoothGattCharacteristic)characteristic).getLocalValue());
} else {
- mGattServer.notifyCharacteristicChanged(device,
characteristic, true);
+ notifyCharacteristicChange(device, characteristic,
true);
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/android/nfc/src/org/qtproject/qt/android/nfc/QtNfc.java
new/qtconnectivity-everywhere-src-6.8.2/src/android/nfc/src/org/qtproject/qt/android/nfc/QtNfc.java
---
old/qtconnectivity-everywhere-src-6.8.1/src/android/nfc/src/org/qtproject/qt/android/nfc/QtNfc.java
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/android/nfc/src/org/qtproject/qt/android/nfc/QtNfc.java
2025-01-24 10:12:03.000000000 +0100
@@ -11,6 +11,7 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.nfc.NfcAdapter;
+import android.nfc.Tag;
import android.content.IntentFilter.MalformedMimeTypeException;
import android.os.Build;
import android.os.Parcelable;
@@ -140,8 +141,12 @@
}
}
+ @SuppressWarnings("deprecation")
static Parcelable getTag(Intent intent)
{
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
+ return intent.getParcelableExtra(NfcAdapter.EXTRA_TAG, Tag.class);
+
return intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/bluez/REUSE.toml
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/bluez/REUSE.toml
--- old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/bluez/REUSE.toml
1970-01-01 01:00:00.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/bluez/REUSE.toml
2025-01-24 10:12:03.000000000 +0100
@@ -0,0 +1,8 @@
+version = 1
+
+[[annotations]]
+path = ["**"]
+precedence = "closest"
+comment = "some generated files have no license in file"
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR LGPL-3.0-only OR
GPL-2.0-only OR GPL-3.0-only"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/bluez/generate
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/bluez/generate
--- old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/bluez/generate
2024-11-21 04:34:01.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/bluez/generate
2025-01-24 10:12:03.000000000 +0100
@@ -1,4 +1,6 @@
#!/bin/sh
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
QGLOBAL_P_H=QtCore/private/qglobal_p.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
---
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp
2025-01-24 10:12:03.000000000 +0100
@@ -73,16 +73,16 @@
if (dataType == 0x16) {
Q_ASSERT(bufferData.size() >= 2);
ret.insert(QBluetoothUuid(qFromLittleEndian<quint16>(bufferData.constData())),
- bufferData + 2);
+ bufferData.right(bufferData.length() - 2));
} else if (dataType == 0x20) {
Q_ASSERT(bufferData.size() >= 4);
ret.insert(QBluetoothUuid(qFromLittleEndian<quint32>(bufferData.constData())),
- bufferData + 4);
+ bufferData.right(bufferData.length() - 4));
} else if (dataType == 0x21) {
Q_ASSERT(bufferData.size() >= 16);
ret.insert(QBluetoothUuid(qToBigEndian<QUuid::Id128Bytes>(
qFromLittleEndian<QUuid::Id128Bytes>(bufferData.constData()))),
- bufferData + 16);
+ bufferData.right(bufferData.length() - 16));
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qbluetoothservicediscoveryagent.cpp
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qbluetoothservicediscoveryagent.cpp
---
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qbluetoothservicediscoveryagent.cpp
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qbluetoothservicediscoveryagent.cpp
2025-01-24 10:12:03.000000000 +0100
@@ -337,8 +337,9 @@
break;
case QBluetoothServiceDiscoveryAgentPrivate::ServiceDiscovery:
d->stopServiceDiscovery();
+ break;
default:
- ;
+ break;
}
d->discoveredDevices.clear();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qlowenergyadvertisingdata.cpp
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qlowenergyadvertisingdata.cpp
---
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qlowenergyadvertisingdata.cpp
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qlowenergyadvertisingdata.cpp
2025-01-24 10:12:03.000000000 +0100
@@ -123,6 +123,9 @@
/*!
Sets the manufacturer id and data. The \a id parameter is a company
identifier as assigned
by the Bluetooth SIG. The \a data parameter is an arbitrary value.
+
+ \note \macos and iOS do not support advertising of manufacturer id or data,
+ so the provided parameters will be ignored on these platforms.
*/
void QLowEnergyAdvertisingData::setManufacturerData(quint16 id, const
QByteArray &data)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qlowenergycontroller_bluez.cpp
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qlowenergycontroller_bluez.cpp
---
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qlowenergycontroller_bluez.cpp
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qlowenergycontroller_bluez.cpp
2025-01-24 10:12:03.000000000 +0100
@@ -64,14 +64,15 @@
const int maxPrepareQueueSize = 1024;
-static void dumpErrorInformation(const QByteArray &response)
+/* returns false if the format is incorrect */
+static bool dumpErrorInformation(const QByteArray &response)
{
const char *data = response.constData();
if (response.size() != 5
|| (static_cast<QBluezConst::AttCommand>(data[0])
!= QBluezConst::AttCommand::ATT_OP_ERROR_RESPONSE)) {
qCWarning(QT_BT_BLUEZ) << QLatin1String("Not a valid error response");
- return;
+ return false;
}
QBluezConst::AttCommand lastCommand =
static_cast<QBluezConst::AttCommand>(data[1]);
@@ -126,6 +127,8 @@
qCDebug(QT_BT_BLUEZ) << "Error:" << errorCode << "Error description:" <<
errorString
<< "last command:" << lastCommand << "handle:" <<
handle;
+
+ return true;
}
static int getUuidSize(const QBluetoothUuid &uuid)
@@ -903,6 +906,7 @@
{
Q_ASSERT(charData);
Q_ASSERT(data);
+ Q_ASSERT(elementLength >= 5);
QLowEnergyHandle attributeHandle = bt_get_le16(&data[0]);
charData->properties =
@@ -912,7 +916,7 @@
// Bluetooth LE data comes as little endian
if (elementLength == 7) // 16 bit uuid
charData->uuid = QBluetoothUuid(bt_get_le16(&data[5]));
- else
+ else if (elementLength == 21) // 128 bit uuid
charData->uuid = QUuid::fromBytes(&data[5], QSysInfo::LittleEndian);
qCDebug(QT_BT_BLUEZ) << "Found handle:" << Qt::hex << attributeHandle
@@ -929,6 +933,7 @@
{
Q_ASSERT(foundServices);
Q_ASSERT(data);
+ Q_ASSERT(elementLength >= 6);
QLowEnergyHandle attributeHandle = bt_get_le16(&data[0]);
@@ -938,9 +943,14 @@
// data[2] -> included service start handle
// data[4] -> included service end handle
+ // TODO: Spec v. 5.3, Vol. 3, Part G, 4.5.1 mentions that only
+ // 16-bit UUID can be returned here. If the UUID is 128-bit,
+ // then it is omitted from the response, and should be requested
+ // separately with the ATT_READ_REQ command.
+
if (elementLength == 8) //16 bit uuid
foundServices->append(QBluetoothUuid(bt_get_le16(&data[6])));
- else
+ else if (elementLength == 22) // 128 bit uuid
foundServices->append(QUuid::fromBytes(&data[6],
QSysInfo::LittleEndian));
qCDebug(QT_BT_BLUEZ) << "Found included service: " << Qt::hex
@@ -949,17 +959,29 @@
return attributeHandle;
}
+Q_DECL_COLD_FUNCTION
+static void reportMalformedData(QBluezConst::AttCommand cmd, const QByteArray
&response)
+{
+ qCDebug(QT_BT_BLUEZ, "%s malformed data: %s", qt_getEnumName(cmd),
+ response.toHex().constData());
+}
+
void QLowEnergyControllerPrivateBluez::processReply(
const Request &request, const QByteArray &response)
{
Q_Q(QLowEnergyController);
+ // We already have an isEmpty() check at the only calling site that reads
+ // incoming data, so Q_ASSERT is enough.
+ Q_ASSERT(!response.isEmpty());
+
QBluezConst::AttCommand command =
static_cast<QBluezConst::AttCommand>(response.constData()[0]);
bool isErrorResponse = false;
// if error occurred 2. byte is previous request type
if (command == QBluezConst::AttCommand::ATT_OP_ERROR_RESPONSE) {
- dumpErrorInformation(response);
+ if (!dumpErrorInformation(response))
+ return;
command =
static_cast<QBluezConst::AttCommand>(response.constData()[1]);
isErrorResponse = true;
}
@@ -972,6 +994,10 @@
if (isErrorResponse) {
mtuSize = ATT_DEFAULT_LE_MTU;
} else {
+ if (response.size() < 3) {
+ reportMalformedData(command, response);
+ break;
+ }
const char *data = response.constData();
quint16 mtu = bt_get_le16(&data[1]);
mtuSize = mtu;
@@ -1000,8 +1026,15 @@
break;
}
+ // response[1] == elementLength. According to the spec it should be
+ // at least 4 bytes. See Spec v5.3, Vol 3, Part F, 3.4.4.10
+ if (response.size() < 2 || response[1] < 4) {
+ reportMalformedData(command, response);
+ break;
+ }
+
QLowEnergyHandle start = 0, end = 0;
- const quint16 elementLength = response.constData()[1];
+ const quint16 elementLength = response.constData()[1]; // value
checked above
const quint16 numElements = (response.size() - 2) / elementLength;
quint16 offset = 2;
const char *data = response.constData();
@@ -1077,16 +1110,25 @@
}
/* packet format:
- * if GATT_CHARACTERISTIC discovery
+ * if GATT_CHARACTERISTIC discovery (Spec 5.3, Vol. 3, Part G, 4.6)
* <opcode><elementLength>
* [<handle><property><charHandle><uuid>]+
+ * The minimum elementLength is 7 bytes (uuid is always included)
*
- * if GATT_INCLUDE discovery
+ * if GATT_INCLUDE discovery (Spec 5.3, Vol. 3, Part G, 4.5.1)
* <opcode><elementLength>
* [<handle><startHandle_included><endHandle_included><uuid>]+
+ * The minimum elementLength is 6 bytes (uuid can be omitted).
*
* The uuid can be 16 or 128 bit.
*/
+
+ const quint8 minimumElementLength = attributeType ==
GATT_CHARACTERISTIC ? 7 : 6;
+ if (response.size() < 2 || response[1] < minimumElementLength) {
+ reportMalformedData(command, response);
+ break;
+ }
+
QLowEnergyHandle lastHandle;
const quint16 elementLength = response.constData()[1];
const quint16 numElements = (response.size() - 2) / elementLength;
@@ -1283,6 +1325,12 @@
break;
}
+ // Spec 5.3, Vol. 3, Part F, 3.4.3.2
+ if (response.size() < 6) {
+ reportMalformedData(command, response);
+ break;
+ }
+
const quint8 format = response[1];
quint16 elementLength;
switch (format) {
@@ -1720,9 +1768,18 @@
void QLowEnergyControllerPrivateBluez::processUnsolicitedReply(const
QByteArray &payload)
{
+ Q_ASSERT(!payload.isEmpty());
+
const char *data = payload.constData();
- bool isNotification = (static_cast<QBluezConst::AttCommand>(data[0])
+ const auto command = static_cast<QBluezConst::AttCommand>(data[0]);
+ bool isNotification = (command
==
QBluezConst::AttCommand::ATT_OP_HANDLE_VAL_NOTIFICATION);
+
+ if (payload.size() < 3) {
+ reportMalformedData(command, payload);
+ return;
+ }
+
const QLowEnergyHandle changedHandle = bt_get_le16(&data[1]);
if (QT_BT_BLUEZ().isDebugEnabled()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qlowenergycontroller_bluezdbus.cpp
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qlowenergycontroller_bluezdbus.cpp
---
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qlowenergycontroller_bluezdbus.cpp
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qlowenergycontroller_bluezdbus.cpp
2025-01-24 10:12:03.000000000 +0100
@@ -1491,7 +1491,7 @@
void QLowEnergyControllerPrivateBluezDBus::requestConnectionUpdate(
const QLowEnergyConnectionParameters & /* params */)
{
- qCWarning(QT_BT_BLUEZ) << "Connection udpate requests not supported on
Bluez DBus";
+ qCWarning(QT_BT_BLUEZ) << "Connection update requests not supported on
Bluez DBus";
}
void QLowEnergyControllerPrivateBluezDBus::addToGenericAttributeList(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qlowenergycontroller_winrt.cpp
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qlowenergycontroller_winrt.cpp
---
old/qtconnectivity-everywhere-src-6.8.1/src/bluetooth/qlowenergycontroller_winrt.cpp
2024-11-21 04:34:01.000000000 +0100
+++
new/qtconnectivity-everywhere-src-6.8.2/src/bluetooth/qlowenergycontroller_winrt.cpp
2025-01-24 10:12:03.000000000 +0100
@@ -307,10 +307,7 @@
QWinRTFunctions::ProcessMainThreadEvents, 5000,
exitCondition);
WARN_AND_CONTINUE_IF_FAILED(hr, "Could not await
descriptor read result")
- if (descData.uuid ==
QBluetoothUuid::DescriptorType::CharacteristicUserDescription)
- descData.value =
byteArrayFromGattResult(readResult, true);
- else
- descData.value =
byteArrayFromGattResult(readResult);
+ descData.value = byteArrayFromGattResult(readResult);
}
}
charData.descriptorList.insert(descHandle, descData);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/nfc/configure.cmake
new/qtconnectivity-everywhere-src-6.8.2/src/nfc/configure.cmake
--- old/qtconnectivity-everywhere-src-6.8.1/src/nfc/configure.cmake
2024-11-21 04:34:01.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/src/nfc/configure.cmake
2025-01-24 10:12:03.000000000 +0100
@@ -9,4 +9,9 @@
qt_feature("neard" PUBLIC
LABEL "Use neard to access NFC devices"
- CONDITION LINUX AND NOT QT_FEATURE_pcsclite)
+ CONDITION LINUX AND QT_FEATURE_dbus AND NOT QT_FEATURE_pcsclite)
+
+qt_configure_add_summary_section(NAME "Qt Nfc")
+qt_configure_add_summary_entry(ARGS pcslite)
+qt_configure_add_summary_entry(ARGS neard)
+qt_configure_end_summary_section()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/nfc/neard/REUSE.toml
new/qtconnectivity-everywhere-src-6.8.2/src/nfc/neard/REUSE.toml
--- old/qtconnectivity-everywhere-src-6.8.1/src/nfc/neard/REUSE.toml
1970-01-01 01:00:00.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/src/nfc/neard/REUSE.toml
2025-01-24 10:12:03.000000000 +0100
@@ -0,0 +1,10 @@
+version = 1
+
+[[annotations]]
+path = ["org.freedesktop.dbus.objectmanager.xml",
+ "org.freedesktop.dbus.properties.xml",
+ "org.neard.Adapter.xml",
+ "org.neard.Tag.xml"]
+precedence = "closest"
+SPDX-FileCopyrightText = "Copyright (C) 2024 The Qt Company Ltd."
+SPDX-License-Identifier = "LicenseRef-Qt-Commercial OR LGPL-3.0-only OR
GPL-2.0-only OR GPL-3.0-only"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/nfc/qndeffilter.cpp
new/qtconnectivity-everywhere-src-6.8.2/src/nfc/qndeffilter.cpp
--- old/qtconnectivity-everywhere-src-6.8.1/src/nfc/qndeffilter.cpp
2024-11-21 04:34:01.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/src/nfc/qndeffilter.cpp
2025-01-24 10:12:03.000000000 +0100
@@ -6,6 +6,7 @@
#include <QtCore/QList>
#include <QtCore/QMap>
+#include <QtCore/QVarLengthArray>
QT_BEGIN_NAMESPACE
@@ -341,7 +342,7 @@
mergedRecords.push_back(currentRecord);
// The list contains the current number of occurrences of each record.
- QList<unsigned int> counts(mergedRecords.size(), 0);
+ QVarLengthArray<unsigned int> counts(mergedRecords.size(), 0);
// Iterate through the messages and calculate the number of
occurrences.
qsizetype filterIndex = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/nfc/qnearfieldtarget_ios.mm
new/qtconnectivity-everywhere-src-6.8.2/src/nfc/qnearfieldtarget_ios.mm
--- old/qtconnectivity-everywhere-src-6.8.1/src/nfc/qnearfieldtarget_ios.mm
2024-11-21 04:34:01.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/src/nfc/qnearfieldtarget_ios.mm
2025-01-24 10:12:03.000000000 +0100
@@ -19,8 +19,8 @@
Q_APPLICATION_STATIC(ResponseProvider, responseProvider)
-void ResponseProvider::provideResponse(QNearFieldTarget::RequestId requestId,
bool success, QByteArray recvBuffer) {
- Q_EMIT responseReceived(requestId, success, recvBuffer);
+void ResponseProvider::provideResponse(QNearFieldTarget::RequestId requestId,
QNearFieldTarget::Error error, QByteArray recvBuffer) {
+ Q_EMIT responseReceived(requestId, error, recvBuffer);
}
void NfcDeleter::operator()(void *obj)
@@ -275,6 +275,7 @@
requestInProgress = QNearFieldTarget::RequestId();
if (errorCode == -1) {
connected = true;
+ justConnected = true;
onExecuteRequest();
} else {
const auto requestId = queue.dequeue().first;
@@ -428,23 +429,38 @@
QByteArray recvBuffer = QByteArray::fromNSData(responseData);
recvBuffer += static_cast<char>(sw1);
recvBuffer += static_cast<char>(sw2);
- const bool success = error == nil;
- responseProvider->provideResponse(request.first, success,
recvBuffer);
+ auto errorToReport = QNearFieldTarget::NoError;
+ if (error != nil)
+ {
+ switch (error.code) {
+ case
NFCReaderError::NFCReaderTransceiveErrorSessionInvalidated:
+ case
NFCReaderError::NFCReaderTransceiveErrorTagNotConnected:
+ if (justConnected) {
+ errorToReport =
QNearFieldTarget::UnsupportedTargetError;
+ justConnected = false;
+ break;
+ }
+ Q_FALLTHROUGH();
+ default:
+ errorToReport = QNearFieldTarget::CommandError;
+ }
+ }
+ responseProvider->provideResponse(request.first, errorToReport,
recvBuffer);
}];
}
}
-void
QNearFieldTargetPrivateImpl::onResponseReceived(QNearFieldTarget::RequestId
requestId, bool success, QByteArray recvBuffer)
+void
QNearFieldTargetPrivateImpl::onResponseReceived(QNearFieldTarget::RequestId
requestId, QNearFieldTarget::Error error, QByteArray recvBuffer)
{
if (requestInProgress != requestId)
return;
requestInProgress = QNearFieldTarget::RequestId();
- if (success) {
+ if (error == QNearFieldTarget::NoError) {
setResponseForRequest(requestId, recvBuffer, true);
onExecuteRequest();
} else {
- reportError(QNearFieldTarget::CommandError, requestId);
+ reportError(error, requestId);
invalidate();
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/qtconnectivity-everywhere-src-6.8.1/src/nfc/qnearfieldtarget_ios_p.h
new/qtconnectivity-everywhere-src-6.8.2/src/nfc/qnearfieldtarget_ios_p.h
--- old/qtconnectivity-everywhere-src-6.8.1/src/nfc/qnearfieldtarget_ios_p.h
2024-11-21 04:34:01.000000000 +0100
+++ new/qtconnectivity-everywhere-src-6.8.2/src/nfc/qnearfieldtarget_ios_p.h
2025-01-24 10:12:03.000000000 +0100
@@ -33,10 +33,10 @@
Q_OBJECT
public:
- void provideResponse(QNearFieldTarget::RequestId requestId, bool
success, QByteArray recvBuffer);
+ void provideResponse(QNearFieldTarget::RequestId requestId,
QNearFieldTarget::Error error, QByteArray recvBuffer);
Q_SIGNALS:
- void responseReceived(QNearFieldTarget::RequestId requestId, bool
success, QByteArray recvBuffer);
+ void responseReceived(QNearFieldTarget::RequestId requestId,
QNearFieldTarget::Error error, QByteArray recvBuffer);
};
struct NfcDeleter
@@ -95,6 +95,7 @@
bool hasNDEFMessage = false;
bool connected = false;
+ bool justConnected = false;
QTimer targetCheckTimer;
QNearFieldTarget::RequestId requestInProgress;
QQueue<std::pair<QNearFieldTarget::RequestId, QByteArray>> queue;
@@ -108,7 +109,7 @@
void onTargetCheck();
void onTargetError(QNearFieldTarget::Error error, const
QNearFieldTarget::RequestId &id);
void onExecuteRequest();
- void onResponseReceived(QNearFieldTarget::RequestId requestId, bool
success, QByteArray recvBuffer);
+ void onResponseReceived(QNearFieldTarget::RequestId requestId,
QNearFieldTarget::Error error, QByteArray recvBuffer);
// NDEF:
void messageRead(const QNdefMessage &ndefMessage,
QNearFieldTarget::RequestId request);
void messageWritten(QNearFieldTarget::RequestId request);