On 32bit builds, jlong is `long long`, so passing in a long and claiming
that it's a jlong is wrong. This causes a build failure after the
addition of optional exception handling for QJniObject calls in
qtbase:d045e2d2b604152450a45846fc87cb53d89bf50a.
Fix that by not specifying the field type explicitly, and instead
consistently cast to jlong (using reinterpret_cast if we have a pointer,
otherwise construct the jlong in place).
This is not a problem for calls that specify e.g. jboolean and then pass
a bool, as those are the same types on all platforms.
Fixes: QTBUG-142334
Change-Id: Icbcab1b20157b2e9d002d2de8efd9fe4acef291d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Drive-by, set QT_EXTRA_INTERNAL_TARGET_DEFINES in one command, more
readable
Change-Id: I6f430d8461493ba34484a6de1889aa95b5d3edf0
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
-Internal classes should have internal class documentation.
Task-number: QTBUG-141665
Change-Id: If6837530f96c2c729726cc7d987bf5c394da609c
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
The Windows backend was unconditionally marking each discovered device
as cached. However, a correct thing to do it to only mark those devices
that come from the OS cache.
For Windows these are always the paired devices.
However, there's one caveat here as well. If the device is cached, but
at the same time actually available, Windows will first report it with
rssi == 0 (at least in case of BTLE devices), and only then deliver an
update with the correct RSSI value.
This patch implements the following logic:
* All newly-discovered paired devices are marked as cached first
* Once there's an update, the device is not considered as cached
anymore.
This works fine for BTLE devices, because they regularly report at
least the RSSI updates.
For Classic Bluetooth we don't have any device updates during the
discovery, so simply rely on the pairing status at the time of
initial discovery.
Fixes: QTBUG-140825
Pick-to: 6.10 6.8
Change-Id: Ifd9ca57fe837522be01555984637cea65094900c
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Certain applications, like the btchat example, need to act as both a
server and a client, using the same service-UUID.
In the server role, they need to advertise the service. To achieve that,
QBluetoothServiceInfo BlueZ implementation is registering a profile
for the UUID.
In the client role, the application needs to connect to a service with
the same service-UUID, as advertised by the server. In order to do it,
the QBluetoothSocketPrivateBluezDBus::connectToServiceHelper() method
was trying to register another profile for the same service-UUID.
Starting from some BlueZ version, this is causing an error:
Client profile registration failed: "UUID already registered"
However, reading the BlueZ docs, I noticed that the RegisterProfile()
method has a "Service" option, whose description tells:
string Service: The primary service class UUID (if different from
the actual profile UUID).
This option was already used in the code, but it was a no-op, because
it had the same service-UUID, as the one that we were trying to
register.
This patch tries to register a client profile with a random UUID, but
pass the correct UUID in the "Service" option (as before). My tests
show that this approach works.
With this patch I was able to start two btchat applications in my
Ubuntu VM, and use one of them as a server (with a macOS client),
and the other one - as a client connected to an Android server.
Task-number: QTBUG-123197
Pick-to: 6.10 6.8 6.5
Change-Id: I71bc231d49929ad54498e9a391d4668e51e6bc3b
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
We currently don't support building Qt with GCC and -ansi (or
-std=c++NN as opposed to -std=gnu++NN), because in that mode, the
language still recognizes __int128_t, but the C++ standard library
does not, leading to bloopers such as std::is_integral_v<__int128_t>
== false or std::is_signed_v<__int128_t> == false, or simply
std::numerical_limits<__int128_t> not being properly specialized.
But we do have QT_NO_INT128, which, when defined, disables all the Qt
extended integer support.
A user requested to allow compiling with -ansi again, to which I
responded that they should define QT_NO_INT128 then, too, but, of
course, the unconditional #define in bluetooth/removed_api.cpp would
cause a redefinition warning.
So fix the code to use a conditional #define.
Amends 5d90296f31.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-139280
Change-Id: I0e453270bea883e995b0cb058bf15111b6f3adc8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The \generatelist command takes an optional argument
that affect how the members are listed, for example,
`classesbymodule` which creates an annotated list of
the classes in a named C++ module.
`groupsbymodule` is not recognized or documented. QDoc
falls back to generating a list of all members of a
group in this case. While the end result is correct,
this relies on an undocumented feature that is likely
to change and break.
Replace these instances with an explicit \annotatedlist
command that produces the same output.
Pick-to: 6.10
Task-number: QTBUG-138901
Change-Id: Ia1122395191d3cad75c7fa6058f52122d3045da4
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The 'androidtestrunner' tool doesn't grant the permissions to
tests when installing aab using bundletool. Disable
QT_USE_ANDROID_MODERN_BUNDLE flag, for qtconnectivity tests.
See QTBUG-138597.
Change-Id: Id40d10df1fce7dd4791cab02691162fedf4099d1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
When buiding namespaced Qt, we need to hide all qt classes inside qt's
namespace.
Pick-to: 6.10
Change-Id: I06ba954772384c9d45c0c20050561338af9c4cc8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Add textual descriptions for annotatedurl.png, annotatedurl2.png,
annotatedurl3.png, and ndefeditor.png in the QtNfc documentation to
ensure QDoc generates alt text.
Pick-to: 6.10 6.9
Fixes: QTBUG-136150
Change-Id: I4ec18fcc7e6a22479173488dd44a00e713a476bd
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Added textual descriptions to images in the QtBluetooth documentation
to ensure QDoc generates alt text.
Pick-to: 6.10 6.9
Fixes: QTBUG-136156
Change-Id: I94ffbb6cb713ac3141f229c9c18e9bc2bd94185c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>