| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| | |
tqtc/lts-5.15-opensource
Change-Id: I4d53774cfe0783f50a123158d8bac7a02c382968
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we try to query local or remote socket info (name, address, port)
before the connection is actually established, WinAPI will return
a null instance of HostInfo for both local and remote hosts.
This patch adds checks that these objects are not nullptrs before
extracting data from them.
Change-Id: I137f1270c1c7d95a1935cc8565cda6c9f7814292
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 45f9e9fcb054c28bc59f6cc480eb08e9b13e5f0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
WinAPI returns the address with parentheses around it. QBluetoothAddress
constructor does not understand such form, so we need to explicitly
remove the parentheses.
Change-Id: Ie2665b3dbe7bd001160ba01aa1db9beb1b8d4d86
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit aba20224710bf66c23909ef1d1f542eaeeeedbce)
Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this patch we were querying local port for both localPort() and
peerPort() calls. This patch fixes it.
Change-Id: Iac1689ab22a010539c27c4890137cab8f7be5e10
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 973f8c6225016fe57d9e62946292f856f369561a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise word in line join without space in between.
Change-Id: I558daa0a26358d435d6000f73c65fb9a0054f53e
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
(cherry picked from commit 819629896fe080bdd79c96a5eb75eec6c368e563)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Windows implementation of QLowEnergyController is using helper threads
to perform device connection and characteristics read for services.
In both cases a new QObject-derived class instance is created and moved
to a helper QThread. A QThread::finished signal was used to destroy both
the helper thread and the object. This was creating a situation when the
order of destruction for a thread and a nested object was not specified.
In practice that could lead to hangs when reading multiple service
characteristics, which is specially seen on Windows 11.
This patch uses QThread::finished signal to destroy only the nested
object. Later on, the object's QObject::destroyed signal is used to
destroy the thread itself.
Task-number: QTBUG-97578
Change-Id: Ic973b835496b6098d47cd1e124315903c143e3e1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 981e3f10f48580641f5e2365953ec8a17b5c96a2)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
or not having proper entries that required on iOS and (starting from
Monterey) on macOS (but LE only). Without them, app crashes due to
exception thrown by the framework.
Task-number: QTBUG-97900
Task-number: QTBUG-96557
Change-Id: Ia1463fa4361884936594780312586eb17f8fe075
Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
(cherry picked from commit dfa20ef097459587ef9086dd6f4edd313123676b)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The connection between QWinRTLowEnergyServiceHandler::charListObtained
and a corresponding lambda was established using a 3-argument version
of QObject::connect, which is implying Qt::DirectConnection.
This means that the lambda was actually executed on the same helper
thread that was responsible for reading characteristics.
This is not the intentional behavior, because it could result in a
concurrent access to serviceList. Also registerForValueChanges()
could be called from multiple threads.
This patch uses the 4-argument version of QObject::connect, so that
Qt::AutoConnection is used. It means that the lambda will be executed
on the main thread.
This patch also removes a duplicated call to thread->exit() from the
lambda. The original call is already performed in a method that emits
the signal. It was not an issue with Qt::DirectConnection, but can be
a problem with the fixed behavior.
Task-number: QTBUG-97578
Change-Id: Ia363489024e46e2879a4bd5e56c2ab8cd6606306
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 4ecc718d418689b9b9b66086ef4d041a21f44327)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the past, QBluetoothLocalDevicePrivate was releasing its instance
of DarwinBTConnectionMonitor, and IOBluetoothDevice was not retaining
this object, thus the correct behavior was assured. Starting from
macOS 12 the behavior changed, just releasing in a dtor is not enough
anymore, instead we should unregister 'monitor' manually, so that
IOBluetoothDevice releases its ownership too. The problem was found
when connecting to LE device which is Classic device at the same moment,
resulting in IOBluetooth sending a notification to the monitor object,
which has a dandling pointer to QBluetoothLocalDevicePrivate.
Fixes: QTBUG-97900
Change-Id: Idcc1233ce51795c561dbee8fd6d9a7aff592a5a2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
(cherry picked from commit 370de7fe8447b8d2216a4cd130df211b05260b8c)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\ \
| |/
| |
| |
| |
| | |
tqtc/lts-5.15-opensource
Change-Id: I5f92cce8507becd3683f24177d0f0251848b9cdc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The characteristics read was using IAsyncOperation->put_Completed() to
process the results of descriptor reading. Each of these completed
callbacks is executed in its own thread. In our case each of the
callbacks is also calling QWinRTFunctions::await() to perform some
async operations.
As a result, if the service has a lot of characteristics, we could
end up spawning multiple threads, each of them doing some CPU-consuming
operations. Normally it's not a problem, but looks like for some
bluetooth peripherals reading the characteristics can take significant
time. Connecting to such devices can result in 100% CPU load for all
cores if the number of characteristics exceeds the number of logical
CPUs.
This patch removes the put_Completed() approach in favor of another
QWinRTFunctions::async() call. This will guarantee that all the
characteristics read operations are performed in the same worker
thread. As a drawback, characteristics reading becomes sequential,
which makes it slower.
Fixes: QTBUG-97242
Change-Id: If46c3f0afe13a56d93f2b8fc46b87a2c90555bf3
(cherry picked from commit 2a7ef291d696745887e71f8b0e27cb4c8701bdd2)
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce a separate worker that will do all the system calls in a
separate thread and emit a signal once it's done.
This will allow to avoid the crashes caused by disconnectFromDevice()
being called while connection is still in progress and spinning in the
QWinRTFunctions::await() method.
Basically this patch moves the connection code to a separate worker,
and introduces new macros to handle the errors.
It also makes use of the new early return condition of
QWinRTFunctions::await() that was introduced in
1f86957f1dd14cc538e7ad9ffee4eb63001af407.
As a drive-by: increased the characteristics read timeout, because
the initial one was not always enough even for a turned-on device.
Apart from that this patch also solves some other issues and crashes
that could happen due to async nature of some calls. For example:
- handle the fact that service discovery might finish after the
device was disconnected. No need to notify about discovered
services in this case.
- add missing checks for thisPtr != nullptr in some callbacks that
capture thisPtr.
Task-number: QTBUG-96057
Change-Id: Ia2d044a89e3427a53d0879e045b6230d16bac3ce
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a00ffdfc3569a5741bc42739570dea2ec52b7f0f)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The BT LE connectToDevice() method on Windows was a synchronous
operation for the caller by blocking while spinning the event loop
to keep rest of the application responsive.
Other platforms behave differently. This commit makes the connect
call to return immediately while scheduling the connection in the
background.
The QTBUG-83633 was originally about slightly different crash which
seems not be reproducible anymore, but this crash was found while
investigating that and is investigated in that item.
Task-number: QTBUG-83633
Change-Id: I092a94f2437351d27da758db6746f5b24d5fa9c7
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 3fc3716e0cd209cd9475d632925a9148b40b2f1d)
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The connection method was infinitely trying to connect to a specified
bluetooth device, which does not make much sense and could lead to the
application being stuck.
This patch limits the connection attempts to a reasonable amount of
time. If the connection was not established within this time,
ConnectionError is set and controller state is reset to UnconnectedState
Fixes: QTBUG-80719
Fixes: QTBUG-89149
Change-Id: Ib8efb690a8b0485c8e9d4844799c7332ab81bf97
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 007dcbf074a9e4d72e2a29a4a28ac5e502830e20)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit amends 83a845aa0e5bb155fae3f1d5d27bb80801f90935.
The callback can be called after the worker was deleted.
Task-number: QTBUG-96057
Change-Id: Ifbd58b240667bd5ff805b4250cf98a9fd2f96e90
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 3573702aa81f3f7ea20e947dbd27c5d1122cc42a)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If 'inquiryLength' was ignored. This change is to be revisited
after the official release of macOS 12 - it could be a bug in beta
versions and all this additional timer machinery is a waste.
The fact I was able to observe the same problem with 10.15.7
is quite troublesome though.
Fixes: QTBUG-95960
Task-number: QTBUG-95686
Change-Id: I56685e07791dd751aec81bebbeefde19d31555df
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit cf8ade9fd809e62cb61bb897b3789c75a48f5996)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Info.plist with a textual description of why and what Bluetooth
is needed for by a Qt-based app is required on iOS.
Change-Id: If838b57d6c13da9aeaf436dd013bd8496984a8bb
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
(cherry picked from commit 5953696dbd294918baf33b26ccad526d3332f967)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|\ \
| |/
| |
| |
| |
| | |
tqtc/lts-5.15-opensource
Change-Id: Idc85041896434539774ca606f1b74002d98dc3ba
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes: QTBUG-95349
Change-Id: Ie1a7c71a33e5d620d914ffce193a89d080d81af9
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit eef11fe06c8458b9668f367502a479497831db62)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of asserting everywhere, we at least set the error and return
gracefully.
Fixes: QTBUG-90369
Fixes: QTBUG-95156
Change-Id: I143408b4b30322bb8b490d5848f731f753669015
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
(cherry picked from commit 085af5ef811e293377ba92cd12dbda926db27620)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bluetooth seems to be non-functional when location services are
disabled. This is not documented in Android's documentations,
but several bug entries exist about this which are closed
as "works as intended". See the linked bug entry for details.
Our code thus tries to detect whether location services are enabled.
This patch improves the detection of enabled location services.
While the previous code did only check for GPS and Network
location providers, the new code should detect any enabled
location provider.
Fixes: QTBUG-90760
Change-Id: I0c670296d0af62161dbc3fca40889996fa91f0ca
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 4fdcd2d8d2c2b47ec142b744ad291c1e134db7d4)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|\ \
| |/
| |
| |
| |
| | |
tqtc/lts-5.15-opensource
Change-Id: If90eb1db8f874742b028a258d582bdd0a5fd5322
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
> warning: loop variable 'service' creates a copy from type 'const QBluetoothUuid'
Change-Id: I37fce9793f4f8a18f64f2de5fa43b56ec430aabf
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 496801629cd44f21986960dc06810e4e481f5035)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| | |
Change-Id: I1465ba2b94fa02ebe4a852dae0747a8530c2968d
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit ec3c1b596455bb69af43cfdcb3b80b182b055162)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
By default, the value for CBCentralManagerScanOptionAllowDuplicatesKey
is 'NO' (but either passing it explicitly or passing nil as 'otpions').
According to a report, this disables a proper device discovery (contrary
to what is documented by Apple). Since, according to the Apple's docs,
"Disabling this filtering can have an adverse effect on battery life;
use it only if necessary", we don't set it by default and instead
provide a workaround using environment variable to set the option,
if needed. The name of this variable is:
"QT_BLUETOOTH_SCAN_ENABLE_DUPLICATES".
[ChangeLog][QtConnecivity][Bluetooth][Darwin] Enable setting a scan option (that allows duplicates)
Change-Id: I08a5a089020c433a87bcb622d08aa2cd260283b9
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit e0e46f3f4cd5f482ef8a95b87a3d341cc3bf4076)
|
| |
| |
| |
| |
| | |
Change-Id: I740ecdd2a79bb4011b61e751edba918ea64b249e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| |
| |
| | |
tqtc/lts-5.15-opensource
Change-Id: I86f7492c32a43094f37cfb9b21ad1066aa49ba68
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
setSocketState emits signals and should thus be called last.
I most code, setOpenMode is called before setSocketState. But in some
occasions, setSocketState was called before setOpenMode. This patch
introduces a consistent call order: setOpenMode before setSocketState.
Change-Id: I07f33511c76fbd08c79050a3fcbc1e1dd72fff04
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 62da7abae76b78fdc9385a0d997f3483057cf37c)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QBluetoothSocket::close emitted "disconnected" twice on macOS.
The first emit is by setSocketState(UnconnectedState).
This patch fixes the behavior to only emit it once.
Fixes: QTBUG-91164
Change-Id: I7147a28b40c49db947ee97a4f1a14f319da341d1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 2a6ab855c2a4ffc5253126d53bc667b0076dd9c9)
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many occurrences in tst_qlowenergycontroller exist where
disconnectFromDevice() is called but the code did not wait for the
disconnect to happen. This patch changes this.
Change-Id: I1df4e68136b8a83640af1fc50298e559d983cc9a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 180f895023f136a694738667a73674968964bafc)
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a DBUS interface was removed for a device, error handling
just assumed it was the org.bluez.Device1 interface, without checking.
This lead to errors on disconnection if the device has a battery
service: The code sends a disconnection request, then an
InterfaceRemoved event for org.bluez.Battery1 occurs. This was
interpreted as a removal of org.bluez.Device1 which in turn
led to the controller going into UnknownRemoteDeviceError error state.
This patch adds a check whether it is really org.bluez.Device1
which is removed.
Change-Id: I449b29cb9528cda23ce972f36f716a8774f01fe5
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit af5f801c6b8de0bf0d21798bddef54cb14759ecd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|/
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0db3b38521e11147cb802798a2cb7811a96029a9.
Revert of commercial license headers is required for Qt 5.15.3
opensource release.
Task-number: QTBUG-91108
Change-Id: Ie82dac4e6a4e2e0e1207d17a10c09701871d6875
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QBluetoothSocketPrivateBluezDBus uses asynchronous calls,
then blocking waits for the result and then does error handling.
The blocking wait was missed in one place, rendering the following
error handling code dysfunctional.
This patch adds the required blocking wait.
Fixes: QTBUG-82407
Change-Id: Ia45372e3b6cce3617d6c985fe1800a33631bc0fc
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 7aa19c8a512fdceac12cf4ee6587626e3de61c25)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In service registration, a profile is created. This profile had
no clien/server flag. If two profiles with the same UUID are
created (one for server side, one for client side) this led to
the wrong profile being used in connection setup.
This patch marks the profile which is created in registerService()
as a server profile which prevents it from being used by BlueZ
in a client context.
Change-Id: I95b22657a7c7e45b334476a8513d79920ba9cc96
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit e74cb54a4cbc8aba188ea48ae3effcf10432df11)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updated header.COMM to the files in tqtc-qtconnectivity.
Examples, tests or documentation files are not updated.
The commercial license header may contain some
additional lines so that its line count equals with
the earlier license header. Reason for this is that
some autotests use hard coded line numbers and a
change in the line count causes failures in test.
Task-number: QTQAINFRA-4159
Change-Id: Icf450df25282ffadf5bcd0950753d17ba6ab57e3
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
where serviceDiscovered was invoked via QueuedConnection and the controller
was in the correct state for details discovery in case an application
wants to discover details in the slot, attached to the serviceDiscovered
signal.
Change-Id: I3cbd0a0fa9913003d7b1c388a1c3653e04a505b0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 7ff8f2d0546262816ab94684a992428cc2cb8a9e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
The int-overload produces a warning
Task-number: QTBUG-70441
Change-Id: I1c787e0a5852388d5a08630a51189f9c0661968e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| | |
Change-Id: Iab21a9155cd4b1cba4c65332fff02df9c149f57a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
cannot be found
If the host does not support BTLE, connectToDevice will fail and mDevice
will be zero. The return in this case was missing so that we tried to
access a null pointer and caused an exception.
Change-Id: Iba973f3980a2ecbb82d2cb6dd8d0f60a5bdf4890
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I037246140f5c52dde3335952d4bf77e43b1c3503
|
| |
| |
| |
| |
| |
| |
| | |
fixed undefined errno when compiling with clang++ and libc++
Change-Id: I30be6e2da36f9189261535f103ce689462634f49
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I9ddb290a10a620334abaf0500dd7b280e86b3a03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
BlueZ 5.50 adds support for this feature.
This patch was provided by David Lechner via QTBUG-81696.
Fixes: QTBUG-81696
Change-Id: I2a73b173821e36534b3848f7d0e35df16f118011
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I5fe705f8a5f375ae44169a465515bb2c54cf6393
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code to detect the error existed on the Java/JNI side. The code to
handle and report the error was available on the Qt side. Unfortunately
the essential signal and slot connection was never made though. This lead
to
[ChangeLog][QtBluetooth][Android] Fixed the missing
QLowEnergyService::error() signal emission if the error was detected
on the Java side. This probably cut 50% of all errors out.
Change-Id: I6ee4d7605a1d1e61b920da56d7f67373fb7f5be5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.
Change-Id: I2de4dcdb43a3ac6640f07fba463462e58fa16000
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Iea61654bd94c9bb4be0736a5d5512fb42d845488
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since Android 10(SDK v29+) all types of Bluetooth device discovery
require ACCESS_FINE_LOCATION. This is highlighted by
https://developer.android.com/about/versions/10/privacy/changes#location-telephony-bluetooth-wifi
Fixes: QTBUG-81875
Change-Id: Icaecca1f72a994dc774dc2b90194da15cc0787b0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the classic scan does not start properly we immediately error out.
If the user has requested LE discovery in addition to the classic discovery,
we should continue with LE discovery.
By convention, we only bother the user with an error signal if none of the
two methods succeed.
Task-number: QTBUG-81875
Change-Id: Id867892210fbef6da0e4937c2aef20f726ba9a2a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The location permission and a running location service have
been a prerequisite for a successful LE scan since Android v23.
While the permission has always been checked before doing a bluetooth scan, the
state of the location service was not checked. LE discovery
without location turned on does not error out. It just reports zero
discoveries.
Starting with Android SDK v29, a classic Bluetooth discovery requires
a running Location service too. Due to BluetoothAdapater.startDiscovery()
returning an error code when location is turned off, it was time to
check the location service before triggering the discovery
to simplify the error handling for the API user.
This patch ensures that location is turned on before any type of device
discovery is started and the API reports an error reflecting this problem.
Task-number: QTBUG-81875
Change-Id: Id51fd502ae24cbadbc704451fdf49d999224c16f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|