REUSE.toml files are read by reuse to complement or override the
copyright and licensing information found in file.
The use of REUSE.toml files was introduced in REUSE version 3.1.0a1.
This reuse version is compatible with reuse specification
version 3.2 [1].
With this commit's files,
* The SPDX document generated by reuse spdx conforms to SPDX 2.3,
* The reuse lint command reports that the Qt project is reuse compliant.
[1]: https://reuse.software/spec-3.2/
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Pick-to: 6.8
Change-Id: I641e0dfa17a62cdff5b3b76698c4edb4df100bc4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
It is only available on Linux Kernel API backend, so explicitly mention
it in the docs. Also explain, why it cannot be supported on other
backends with the current API.
As the new Linux D-Bus backend, together with the Linux Specific docs
section, was introduced only in 6.5, pick this patch down to that
branch only.
Task-number: QTBUG-130146
Task-number: QTBUG-130891
Pick-to: 6.8 6.5
Change-Id: I5395fed6606d84ed1d1f032c45b31759330293dd
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
clearTarget calls 'invalidate' on a private target pimpl object,
which it's documented to own (via a public target object).
It's possible to call deleteLater on QNearFieldTarget object
but this potentially leaves us with a dandling pointer, since
we do not remove deleted object from 'detectedTargets'.
Protect against this using QPointer.
Change-Id: Ib970fde0233d383b727b90afeb2aedf7eb4a9e9c
Pick-to: 6.8
Fixes: QTBUG-129977
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
When trying to force asserts, MinGW starts complaining about calling
qFromUnaligned<uint16_t>() with a static QBA::_empty member:
error: array subscript 'short unsigned int[0]' is partly outside
array bounds of 'const char [1]' [-Werror=array-bounds=]
However, the code explicitly checks that QBA size is >= 2 before
going into this branch, so it looks like an incorrect disgnostics
from MinGW.
We already had the similar warnings in other places, and
qtbase/de005e7976e4b110d6b5f32a8bab5141713acb7b suggests that the
proper fix is to cache the QBA::size().
However, applying this fix alone does not solve the problem, so
explicitly create a QByteArrayView on the response, and use it
in all the operations, except for the final assignment.
Fixes: QTBUG-129763
Pick-to: 6.8 6.5
Change-Id: I1e7ce87801320a0960fded208a41984e7668dfb0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Use QJniArray and rely on implicit conversion for QString, QByteArray,
and QStringList. Make QJniArray instances const to avoid problems when a
mutating iterator API is added to QJniArray.
Change-Id: I174a0a2bc99b77f07242e03f76735ef1333c89c4
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
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.8 6.7 6.5
Change-Id: I6746148b39dc11af6527efd8b41d25940a93ca49
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
For some reason, the operators should be inside Qt namespace, otherwise
the compiler fails to see them.
That slipped through the CI because we do not have any Windows configs
with namespace builds there.
Amends a5552379dd.
Fixes: QTBUG-128465
Change-Id: I047a20549d526f18cac6bc51a74a62a88ff022ff
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Since API-level 31 the location permission is not mandatory in most
cases, and this commit makes the recommended maxSdkVersion entry.
Notably the application may also link against for example QtPositioning
module which also defines the ACCESS_FINE_LOCATION but without any
maxSdkLevel entries. Therefore a pre-requisite for this change
is a permission duplicate-resolution change in 'androiddeployqt'
utility (a permission without additional attributes must get
priority).
Change-Id: I76dbf3b423efe16b094bda92d9fdb62402346b03
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Since Android-12 (API-level 31) the location isn't a mandatory
requirement, and the code should allow proceeding also when
location services are switched off.
Location and the related permission isn't needed if
the API-level is 31+, and the BLUETOOTH_SCAN asserts
'neverForLocation'.
[ChangeLog][Important Behavior Changes][QtBluetoothDeviceDiscoveryAgent]
Android implementation now allows starting scan even if Location is
switched off and location permissions aren't granted. This requires
that API level is 31+ and that BLUETOOTH_SCAN asserts
'neverForLocation'.
Task-number: QTBUG-117358
Task-number: QTBUG-112164
Change-Id: Iac7a99fdf5d3144d6ad06d93aa394b2df71d37b0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Since Android-12 / API-level 31 the ACCESS_FINE_LOCATION is no longer
mandatory for Bluetooth usage. Removing it will avoid unnecessary
location permission query (user prompt).
In addition, for the Bluetooth to work without ACCESS_FINE_LOCATION on
these newer API-levels, we must also assert in the manifest that
we don't use bluetooth scanning to derive a location. This is an
attribute for the BLUETOOTH_SCAN permission.
There are less common use cases to derive the location too. In these
cases the user must override the BLUETOOTH_SCAN permission so that it
no longer asserts neverForLocation, and also request the
ACCESS_FINE_LOCATION permission separately (QLocationPermission).
This change also relates to QBluetoothPermission change in QtCore,
which no longer shall request the ACCESS_FINE_LOCATION permission.
Task-number: QTBUG-117358
Task-number: QTBUG-112164
Change-Id: If6ebc17dff1c4799bf35ff037f70d97d91be5dfe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
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
Pick-to: 6.8
Change-Id: Iaed52f113633f97fa58705298140d2e68bdd3683
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
This change adds CBCentralManagerDelegate for listening bluetooth
state changes. This enables the emission of
QBluetoothLocalDevice::hostModeStateChanged() signal also on macOS.
Fixes: QTBUG-123425
Change-Id: Ic07ecb120f7fd8f061ba832101b96ca5b442dffc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
It should mention RFCOMM channel, not L2CAP.
Pick-to: 6.8 6.7 6.5 6.2
Change-Id: I2c23a73f9f4e5ccaea82402c5bd4b5301dda393d
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
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.8 6.7 6.5
Change-Id: Ie21a2e66b570a32b1c4401305738515bc6d04f85
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
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.8 6.7 6.5
Change-Id: I187a0b2e293462c6e9b7e5e3afee2e6ddf4d2ab1
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
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
Pick-to: 6.8
Change-Id: I370f9c9f860195a688f4e65db976d45e238a11b7
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
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
Pick-to: 6.8
Change-Id: Ic74f6879f4ec593fdaa4b36d2233bd48df0c5f8f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The correct page title to link to is 'Qt for Linux/X11'.
Pick-to: 6.8
Change-Id: I9de1a6882e0f81867caff649fcff6b5874654f49
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Most changes in this patch are direct translations of WRL-style API
calls to C++/WinRT, ideally with no change in caller-observable
behavior.
The C++/WinRT API provides error handling by means of exceptions. To
maintain caller-observable behavior, all API calls need to be secured by
a try-catch block. A few helpful macros are used to keep the translated
code readable:
- TRY(x): evaluates x, yields a bool that indicates if the evaluation
generated an API exception (true = no exception).
- HR(x): evaluates x, yields an HRESULT that corresponds to the
exception generated (S_OK = no exception).
- SAFE(x): yields a value corresponding to the evaluation of x, or
nullptr in case an API exception was generated.
Task-number: QTBUG-120665
Change-Id: Iaef4f04c61fca2265e4730fb44e99877b38dc168
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit organizes the articles, so they:
- have a reasonable tree structure
- can be navigated through the topic tree in the Qt Creator help viewer
Task-number: QTBUG-127023
Change-Id: Idfd2eb82e5c110a0bc1db573e4230381e484ce0e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
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.8 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>