Commit Graph

3567 Commits

Author SHA1 Message Date
Juha Vuolle dd8ff89a1b Prevent BT LE Mtu exchange from triggering RSSI read
The commit introdocing RSSI read for Android
bc6e4e2860
seems to miss a 'break' statement when checking
BT LE (central) job type, causing MTU exchange to
also perform an RSSI read.

Pick-to: 6.7 6.5
Change-Id: I6746148b39dc11af6527efd8b41d25940a93ca49
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 86b957da94)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-02 17:28:09 +00:00
Juha Vuolle 3f51ff83ca Fix a fall-through warning
Change-Id: Id95f1fb811a04c28775709d6d0e1a8e2d176fe1e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit d7d9b43cdd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-02 17:28:03 +00:00
Juha Vuolle b073ee5c15 Darwin: Add Bluetooth state monitoring for QBluetoothLocalDevice
This change adds CBCentralManagerDelegate for listening bluetooth
state changes. This enables the emission of
QBluetoothLocalDevice::hostModeStateChanged() signal also on macOS.

This is a manual cherry-pick from 788a21a443584473ed7669cedb46dbcbd009954f

Pick-to: 6.7 6.5
Fixes: QTBUG-123425
Change-Id: I788ed70fe67ea3fcae970988136650abef030c4b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-08-29 11:52:11 +03:00
Paul Wicking 5f144de399 Doc: Remove usage of defunct QDoc command
The QDoc command `\tableofcontents` was rendered useless by a change
more than a decade ago. Remove the use of `\tableofcontents` as it
serves no purpose, and ensure that the surrounding context still makes
sense for the reader, by removing preceding text that refers to a
non-existing table of contents, such as `Contents:`.

Task-number: QTBUG-128173
Change-Id: Iaed52f113633f97fa58705298140d2e68bdd3683
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit c39aa15c0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-27 18:01:19 +00:00
Ivan Solovev 6a3330fe57 Fix a typo in the log message
It should mention RFCOMM channel, not L2CAP.

Pick-to: 6.7 6.5 6.2
Change-Id: I2c23a73f9f4e5ccaea82402c5bd4b5301dda393d
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit b16c4cfa6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-26 14:21:37 +00:00
Ivan Solovev 1c0dd03400 macOS Bluetooth: report RemoteHostClosed error when the RFCOMM channel is closed
The ChannelDelegate::channelClosed() virtual method is called in two
cases:
* when an attempt to open the channel failed (because of the timeout
  or an error in rfcommChannelOpenComplete() callbalk).
* when the rfcommChannelClosed() callback is triggered. This happens
  only when the remote host closes the connection.

In the first case we set UnknownSocketError. Keep this behavior.

In the second case no error was reported, which is different from how
other backends behave. This patch updates the code to set the
RemoteHostClosed error if the channelClosed() is called, and the
socket was in Connected state.

Task-number: QTBUG-123430
Pick-to: 6.7 6.5
Change-Id: Ie21a2e66b570a32b1c4401305738515bc6d04f85
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit c382034457)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-26 14:21:31 +00:00
Ivan Solovev e21e9bbaac macOS Bluetooth: use a timer when opening RFCOMM channel
An attempt to open an RFCOMM channel should trigger an
rfcommChannelOpenComplete() callback which has an error status.
This happens correctly if the channel is opened successfully (the error
is kIOReturnSuccess in this case).
However, when the remote device is turned off, the attempt to open an
RFCOMM channel never triggers any callback, so the socket simply
hangs in the Connecting state.
Fix it by explicitly using a connection timer. The timer timeout is
picked more or less randomly, but 5s looks like a reasonable time,
because at this point we are simply trying to connect to a known
service. No discovery is needed.

As a drive-by: update the error handling code path in
rfcommChannelOpenComplete() to also signal that the channel is closed.
Otherwise the socket will report an error, but keep hanging in the
Connecting state. This code path is never executed now, but it might
be fixed in later macOS releases.

Task-number: QTBUG-123430
Pick-to: 6.7 6.5
Change-Id: I187a0b2e293462c6e9b7e5e3afee2e6ddf4d2ab1
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 05b8398aa6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-26 14:21:25 +00:00
Qt Submodule Update Bot 8366b00313 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I88369bda25710c00730afbaba1a9ea88f4cb8e5e
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-08-26 10:01:16 +00:00
Qt Submodule Update Bot 95e1219719 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I8f27619801ff65b808d64dade655859bc5f9e57f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-08-24 12:51:20 +00:00
Qt Submodule Update Bot b55350574c Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I78e87ed485bce58ad4e5b9615757c53620a880b4
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-08-22 20:23:24 +00:00
Qt Submodule Update Bot 32f9d0ea8f Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: Ibb5e9ed6b72faee53aa8feb5a1bf2abf66594383
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-08-19 10:06:38 +00:00
Assam Boudjelthia b110428cb5 Android: call the init class setContext() from JNI_OnLoad()
After making internal Java classes non-public, using the init
classes mechanism doesn't work, so do the initialization from
within the module's JNI_OnLoad() instead.

Amends 8e38a6ffcf.

Task-number: QTBUG-126478
Change-Id: I370f9c9f860195a688f4e65db976d45e238a11b7
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 025020adf3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-19 09:53:47 +00:00
Qt Submodule Update Bot cd24f83481 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: Ia9c23859c98c8bca82084d6e469ec4b44c9d1fca
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-08-14 15:28:56 +00:00
Konsta Alajärvi a1ce366679 Remove android:icon property from annotatedurl AndroidManifest.xml
Remove android:icon property from annotatedurl example
AndroidManifest.xml as there are no icons to be used. This results
in Android resource linking failure.

Fixes: QTBUG-127407
Change-Id: Ic74f6879f4ec593fdaa4b36d2233bd48df0c5f8f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit f2660541d8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-14 12:07:52 +00:00
Qt Submodule Update Bot 2d4ac78fa5 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: Icba310cf35db84b45ca06755f138e093d4596f29
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-08-09 15:34:53 +00:00
Qt Submodule Update Bot 633041fad7 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I084d7c31868c1acc9266ea1f329221f3aa2b283c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-08-08 01:43:31 +00:00
Qt Submodule Update Bot 000e6a987b Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I69d77a89ec380763a933d3fe966c1d33924aaea2
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-08-06 21:13:33 +00:00
Qt Submodule Update Bot 448a094efb Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I4945b1508e24ed0102ed707d723331120b53b3e5
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-08-05 19:27:47 +00:00
Qt Submodule Update Bot 286ee7db3c Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I6e934eaa918231342a97dd905814ae0adb39f61c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-07-31 13:46:52 +00:00
Topi Reinio cd876db7ed Doc: Fix link to Qt for Linux
The correct page title to link to is 'Qt for Linux/X11'.

Change-Id: I9de1a6882e0f81867caff649fcff6b5874654f49
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 285729563f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-31 09:27:11 +00:00
Qt Submodule Update Bot 1c99efd42b Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: Ic57d702759f63e97d23e16eeda1007dd4ba5da1a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-07-25 08:24:57 +00:00
Qt Submodule Update Bot 86e0edebb3 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I2a1ca4d7884ac0c7b8a618c99e344df048686ab2
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-07-23 00:05:27 +00:00
Marc Mutz 0101120f81 Port to std::snprintf() and mark the module qsnprintf()-clean
Task-number: QTBUG-127110
Change-Id: I5cbe79c3f5a95ba4ccbab5e2056e2a061f93d448
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e707e33e14)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-22 18:45:02 +00:00
Marc Mutz 39e673bbb6 sdpscanner: fix format strings for (u)int64_t
This probably only worked on Little-Endian machines, but it's UB
there, too, of course.

Wasn't detected by the compiler because qsnprintf() doen't have
__attribute__(printf), for some reason.

Prepare the folded part of the line so a follow-up port to
std::snprintf() doesn't have to re-indent it.

Amends 3ee0be1013.

[ChangeLog][QtBluetooth][sdpscanner] Fixed a bug involving broken
serialization of SDP_(U)INT64 DTDs on Big-Endian machines.

Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Ib4e24007cf498814f3c91b5a57e7dfd6a311926c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fcee2074e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-22 17:28:21 +00:00
Qt Submodule Update Bot 01d0aed739 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: Iada60b30291bc2725a61585b914f3c0deecee174
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-07-18 14:25:07 +00:00
Qt Submodule Update Bot fef85e1e98 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: Ia933c3d2758d0498f0e341601c0cf4dc7741beed
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-07-15 15:23:23 +00:00
Qt Submodule Update Bot 9a2955fc04 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: Icbff1404b79362da56788652310513050b414718
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-07-12 16:46:14 +00:00
Volker Hilsheimer 1afdc8466b JNI: clean up JNI class declarations
Standard types are now declared in qjnitypes.h, so remove the
unnecessary (and already #ifdef'ed out) declarations here.

Remove some unnecessary `;` from the lines using the macro.

Change-Id: I0549efc060f19f0ba6026170aca251b6fea98767
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit ea4fead42c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-07-12 09:56:26 +00:00
Qt Submodule Update Bot 6fc228f759 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I07bc6c2f82ad27fdd6e6d13e0eb3eef7956ba814
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-07-08 20:43:25 +00:00
Assam Boudjelthia 8e38a6ffcf Android: make QtBluetoothBroadcastReceiver private
And call setContext() for the static init class from JNI_OnLoad
in qt bluetooth, otherwise, making this class private will prevent
the init class setContext() to be called from QtLoader.

Task-number: QTBUG-126371
Task-number: QTBUG-126478
Change-Id: I39c9cecdabae9286c80b8a82eb31f14654efa54e
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 5cf2538b91)
2024-07-05 17:57:38 +00:00
Qt Submodule Update Bot b83ae49a8e Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: Ie1fa8fe663a592576c4ba24183961d5c9a926bb1
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-07-03 00:09:32 +00:00
Qt Submodule Update Bot e0b5acc0e9 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I15f0fba00d59fa0dde50dd992c5604fc2eff931e
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-06-28 17:16:24 +00:00
Qt Submodule Update Bot 848c1108f9 Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: If3fe284b7cf17df96c09b9f0a2fbe228b57b409f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-06-27 03:42:41 +00:00
Assam Boudjelthia 7828bdcb97 Android: make internal Java code for QtAndroidBluetooth private
This Java code is mainly an internal implementation detail for
the Qt for Android plugin, and isn't meant to be public
in the first place.

Task-number: QTBUG-126371
Change-Id: I45730737a291298dfa66c0f24e3fcda62fe39c9c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 26e85f88ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-19 19:35:01 +00:00
Volker Hilsheimer 780706d1ab JNI: prepare for standard Java types getting declared in qtjnitypes.h
Only declare the standard types locally if the
QT_DECLARE_JNI_CLASS_STANDARD_TYPES preprocessor symbol is undefined.
That allows us to merge the relevant changes in each submodule
independently, without having to orchestrate the submodule update.

Once all changes are in and the submodule update is through, remove
the declarations entirely.

Change-Id: I01a9a13ae7a1c56809d2755eb2318677264e33f0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0aa72e9992)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-18 12:26:28 +00:00
Volker Hilsheimer 73e1edf82b Port to QJniArray and simplify type usage
Use QJniArray directly, or declare the array type as an alias for
QJniArray<DeclaredClass>. Some more porting away from direct array
unwrapping left for a follow-up commit.

This remove the last usage of Q_DECLARE_JNI_TYPE from this repository.

Change-Id: I5cf08ac5ad5e3e3f909c9c13cabdfc9ab449134c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit f4dd99b46b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-18 12:26:22 +00:00
Assam Boudjelthia b392218d6f Android: make internal Java code for QtAndroidNfc private
This Java code is mainly an internal implementation detail for
the Qt for Android plugin, and isn't meant to be public
in the first place.

Task-number: QTBUG-126371
Change-Id: I45fb22927acb26506aa6369475aa49e5f366d578
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit b2f177c4b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-17 14:12:25 +00:00
Qt Submodule Update Bot 82fd48738e Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: I86822b000a9b1affcf081f4e214385e21ae016ec
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-06-15 20:28:57 +00:00
Volker Hilsheimer 7fd5265152 Add missing trailing comma after new enum value
Found in header review.

Task-number: QTBUG-125859
Change-Id: Idfbbc7312f881295a2c32a9222205c19d1dbdea7
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit bba17408ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 11:44:28 +00:00
Ivan Solovev c5174e47f9 Windows BTLE: support extended advertisements when scanning
Verified that it works using nRF Connect to generate the
BTLE 5 Extended Advertising packages.
Also verified that the legacy advertising keeps working.

Fixes: QTBUG-124650
Pick-to: 6.7 6.5
Change-Id: Id32e262973f85dc3c07b2c4afbcb3777a4d75e4b
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 28127f4e26)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-04 16:44:38 +00:00
Qt Submodule Update Bot 292ae3737a Update dependencies on '6.8' in qt/qtconnectivity
Change-Id: Ied1d1a0d8f50f46e5de17b6e9dbda79db34ad5dc
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-06-03 12:38:30 +00:00
Qt Submodule Update Bot 3676fe7bed Update dependencies on 'dev' in qt/qtconnectivity
Change-Id: Ic3340b153f5bf86825d5ea5e9d25e1be537a4f2c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-05-31 20:06:31 +00:00
Qt Submodule Update Bot 1be6f68195 Update dependencies on 'dev' in qt/qtconnectivity
Change-Id: I07d7ae8ba7db4f8626ed633ed6bc790aa3d7092f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-05-30 20:30:56 +00:00
Alexey Edelev acfde7a0a1 Remove the use of GENERATE_CPP_EXPORTS argument
The behavior that argument was enabling is the default one now.

Task-number: QTBUG-90492
Change-Id: Ifd719331386e835cdc23f83b8f53fb58345d51ae
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-05-29 21:02:31 +01:00
Qt Submodule Update Bot 478fb8ddf3 Update dependencies on 'dev' in qt/qtconnectivity
Change-Id: I957f25eb872740f4a0fdd1c16e7e4325c0021f03
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-05-28 16:33:16 +00:00
Qt Submodule Update Bot 305bc7790c Update dependencies on 'dev' in qt/qtconnectivity
Change-Id: I36504866dcf67123d709c09a9043c008952302eb
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-05-25 01:57:36 +00:00
Qt Submodule Update Bot 38d7ee5956 Update dependencies on 'dev' in qt/qtconnectivity
Change-Id: Ied72a572f9f67093674ae9059f8b9323df820315
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-05-23 17:35:43 +00:00
Assam Boudjelthia 121dba044e Android: cleanup AndroidManifest.xml files in examples
Change-Id: I83d45656948952dc6726138690563cf4106bb691
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-05-23 15:04:35 +03:00
Lars Schmertmann 9163f00814 iOS: Distinguish security violations from other connection errors
Currently it is not possible to decide if an unexpected card
was used or the connection failed in general. So we need to
add a new Error to QNearFieldTarget.

[ChangeLog][QtNfc][QNearFieldTarget] Add a new
UnsupportedTargetError error code.

Change-Id: I8f88bb81b998e61516ed4ceef207ba1528061e7d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-05-21 16:43:19 +02:00
Qt Submodule Update Bot 4f23284110 Update dependencies on 'dev' in qt/qtconnectivity
Change-Id: I9687c1dd0442c9b58c97641c3e73ac91583e830b
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-05-20 14:54:12 +00:00