| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signal about device disconnections has to be done at the very end of
disconnectFromDevice as a user's application might access an invalid
mDevice otherwise if it tries to reconnect automatically.
The list of device services has to be invalidated when a remote device
disconnects. The same is done in other backends.
Additionally the "valueChanged" callbacks should be unregistered on
device disconnection. Thus we avoid late callbacks which might cause
asserts.
Task-number: QTBUG-74394
Change-Id: I156be8ebefc9d9e5533bc60e7018088641680ba3
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: Id7c4409314c2ad5daf5bc9860befe096a2384849
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][QtBluetooth][Linux/BlueZ] Fixed missing emission
of QBluetoothSocket::bytesWritten() signal on Bluez v5.46+.
Fixes: QTBUG-74513
Change-Id: I93cb5abe65e13f6a5cc5bb195cc98526a507916a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I964806ccdb3bd39a33b860d496ef05f8b96135db
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This partly reverts b3b387698e8f685e8bd4f4843a170da40e17249b.
The global static connect was not correct. Furthermore the new global
static variable was triggering
src/nfc/qnearfieldtarget_emulator_p.h:125:31:
warning: 'globalTagActivator' defined but not used [-Wunused-variable]
The global static variable is shifted to no longer require exposure
inside the header file.
Fixes: QTBUG-74538
Change-Id: Ic5e8211d358bae9c2ed0418aec5c4316fb249c98
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Call to includedServices() from Qt side after unexpected disconnection
leads to NullPointerException due to unchecked member access. Fix that!
Change-Id: Iae89801d7af86d5a3f34ebba9eb2ea12da252cd2
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-71943
Change-Id: I35f9aedb0615d8341f93f67b4549d1e9a03c9cb9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
IGattCharacteristic::GetAllDescriptor is deprecated and thus should not
be used. As we are calling GetDescriptorsAsync anyways and are inside
the Completed callback of that function we should use its result
anyways.
Change-Id: I362f860d66da75dd899ed89604e426952ce9fe1b
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have to register callbacks for every indicatable characteristics we
encounter during lookup so we have to store our list for the whole
lookup period.
Previously the list of indicatable characteristics was recreated in
every "Completed" handler of Characteristic::GetDescriptorsAsync.
The result was, that at most 1 indicatable characteristic was found.
That behavior is wrong and we have to store the list of indicatable
characteristics through the whole obtainCharList call.
Fixes: QTBUG-74394
Change-Id: Ie93d9bd0184686d2d7cf9b082e85cf89ca5493ce
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order to protect ourselves from late callbacks we have to unregister
the LE watcher's callback as soon as we signal, that we are done with
device discovery. We do not expect any additional devices afterwards and
might run into a late callback otherwise, so we should stop the watcher
immediately and not wait until worker destruction.
Change-Id: I85520a4724397aeb5a693d2c8b940a72d68d9663
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"ConnectedState" is not the only valid "connected" state for
QLowEnergyController. "disconnected" also has to be emitted, if we were
in DiscoveredState and co.
Additionally every value change callback has to be removed and mDevice
has to be closed in disconnectFromDevice to make Windows disconnect from
the device as there is no specific API to do that manually.
Task-number: QTBUG-74394
Change-Id: Ic025b2c668f887db6c4a631cd8fee26a457bc279
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I41929e01b79ca0eacf80fcb1d5cead2146eb2e8e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| | |
Fixes: QTBUG-71943
Change-Id: Idb0524dde871d4aa153f0170f926ae76679f14cb
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-71943
Change-Id: I5f508c6d858f088d518fc0b3ad9644273f31e2de
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Iabb236577d813bf72b2237fedc60b894fae06bc4
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Ia762f6ebce1512f937a529f68eb02c008ecd9732
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Calling disconnectFromDevice() while not connected or in ClosingState
caused a crash on accessing device which is null.
[ChangeLog][QtBluetooth][Bluez-DBus] Fix crash at calling
QLowEnergyController::disconnectFromDevice while not connected
Change-Id: I5979e3e5fca62c4a1469014e4f553c7db24f8dac
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Idd29729e80d44abe6404da2853c2fe1e887f7db4
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code was converting signed ints/chars/shorts to hex notation without
prepanding the '0x'. This led to Bluez reading the value as base 10 value
and created the problem that values containing letters were improperly
parsed.
Fixes: QTBUG-73330
Change-Id: I9407a82495761b2e541e13b282ad6ccdb7cdd84a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Iad66628307a2167cdd6c64080457c670697bd1f7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This addresses the issue on Bluez only. macOS ignore such
attribute values and WinRT implicitly converts them to hex strings.
The macOS debug stream operator produced slightly different output
compared to the other platforms. The output between the platforms
must match though. Therefore, the general version was copied over
to macOS.
Task-number: QTBUG-73328
Change-Id: Ieea2a3a559b5686f7f7d16d5c75dd9ef2782cdf5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement QAbstractItemModel::roleNames(), fixing the deprecationw arning:
qdeclarativebluetoothdiscoverymodel.cpp:175:27: warning: ‘void QAbstractItemModel::setRoleNames(const QHash<int, QByteArray>&)’ is deprecated [-Wdeprecated-declarations]
Add missing overrides to silence new warnings about insconsistent
override.
Fixes: QTBUG-73717
Change-Id: Iea9bd1d6cccfbecac7e3cf56101a5d65d466c023
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Ie734d2574c039a7f45d84455811472ea5b8c8e1c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It fixes the following failure
FAIL! : tst_QBluetoothServiceDiscoveryAgent::tst_invalidBtAddress() Compared values are not the same
Actual (discoveryAgent->error()) : InvalidBluetoothAdapterError
Expected (QBluetoothServiceDiscoveryAgent::NoError): NoError
This behavior was caused by the fact that the InvalidBluetoothAdapterError
was already triggered in the QBluetoothServiceDiscoveryAgent ctor whereas
convention for this class states that the error is set when
QBluetoothServiceDiscoveryAgent::start() is called.
The fix detects whether the requested local adapter address matches the
existing local adapter address. If there is no match Invalid adapter error
is thrown.
Task-number: QTBUG-73571
Change-Id: I3216e1609820a66893768b33f0fc695fbad6966a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Passing the local address does not work because the passed address
cannot be matched against the local adapter address. For privacy reasons
this is not possible anymore since Android 6.0.
Change-Id: Iacc632dda4af83265bdc3a062c0eba6c31cfa596
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Similar to the problem found in osxbtleinquiry - 'timers' waiting to
fire on "qt-LE-queue" know nothing about us, potentially deleting the
delegate object in response to Bluetooth switched off.
Task-number: QTBUG-73140
Change-Id: I1a39a1ca02d019f90a1b4214cdbbb76e26b9eea0
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. When the central's state changes to powered off, we emit PoweredOffError
and QBluetoothDeviceDiscoveryAgent deletes Obj-C instance - a delegate
for CBCentralManager. But we can still have GDC timer waiting in a queue
and triggering the crash while using a dangling pointer. So we have to properly
cancel the timer.
2. CoreBluetooth under debugger warns about API misuse - calling stopScan,
apparently, is not allowed if CBCentralManager is in a state different
from 'powered on'.
Change-Id: Ib218105735995dc7988751fa04a6c76cab10cba8
Fixes: QTBUG-73140
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I82d691667232bebf7fed2cf9b24b234289e6d258
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The signal parameter needs to be fully qualfied so that it can be
correctly matched when using the macros.
This can cause a breakage if an application was connecting using the
non fully qualified type, which can be the case if invokeMethod() or
similar is used. However the chances of this are incredibly slim, and
it is worth the risk to ensure normal connections will work correctly.
[ChangeLog][Important Behavior Changes][QtNFC][QNearFieldManager]
adapterStateChanged now has a fully qualified parameter -
QNearFieldManager::AdapterState. This can cause a problem if the
connection/method invocation was done with just AdapterState as
the parameter type, in which case these need to be changed to
use QNearFieldManager::AdapaterState instead.
Change-Id: I7311ff4cb15b67089ceb5917961ee979c9566f28
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Ic64c5646f2a1c1b057f2a27e66b37364a320b12e
|
| |
| |
| |
| |
| |
| |
| | |
happens due to accessing already destroyed receiver from the queued call
Change-Id: Ibc4a9abbb8c00ef9c8985f481b70db36fa508df8
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I2202fa305f4c50e97ae7701096b2f8e0bb9b3daf
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: Ie774891eca63ff51e8829d189ca1b69d75adfe64
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Method enableForegroundDispatch and disableForegroundDispatch is not
implemented on some WearOS devices and will throw an exception.
Let's check if the NFC feature exists.
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at org.qtproject.qt5.android.bindings.QtApplication.invokeDelegateMethod(QtApplication.java:157)
at org.qtproject.qt5.android.bindings.QtApplication.invokeDelegate(QtApplication.java:146)
at org.qtproject.qt5.android.bindings.QtActivity.onResume(QtActivity.java:626)
at com.governikus.ausweisapp2.MainActivity.onResume(MainActivity.java:139)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355)
at android.app.Activity.performResume(Activity.java:7117)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1638)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.UnsupportedOperationException
at android.nfc.NfcAdapter.enableForegroundDispatch(NfcAdapter.java:1315)
at org.qtproject.qt5.android.nfc.QtNfc$1.run(QtNfc.java:135)
at android.app.Activity.runOnUiThread(Activity.java:6184)
at org.qtproject.qt5.android.nfc.QtNfc.start(QtNfc.java:111)
at org.qtproject.qt5.android.QtNative.updateApplicationState(Native Method)
at org.qtproject.qt5.android.QtNative.setApplicationState(QtNative.java:260)
at org.qtproject.qt5.android.QtActivityDelegate.onResume(QtActivityDelegate.java:1098)
... 16 more
See: https://stackoverflow.com/questions/48437854/huawei-watch-2-nfc-feature-not-available-android-wear-2-0
Change-Id: I0e2cad3dce1c3c0a2ea2545fcc6731e2621cdc38
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: I9e22e3963466ff8909f58cfb252dceac6ee2e7bd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QBluetoothServiceDiscoveryAgent::start(FullDiscovery) uses an external
tool called sdpscanner to perform the SDP inquiry. The tool uses Bluez's
own API to perform the task and is GPL.
In case a remote device offers a custom service the service uuid is returned
as serviceClassUuid. QBluetoothServiceInfo::serviceUuid() remains empty
although it should be populated as per API contract. This patch ensures
that the first custom uuid is shifted from the serviceClassUuid list to
serviceUuid(). The fix is limited because it picks the first custom uuid
and does not consider a secondary custom uuid. Such a case is extremely
unlikely though and I have not come across it.
Fixes: QTBUG-72800
Change-Id: I7256440bcb1c9b0b2fb75249f977c43fecf1d910
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The related bug only happens for custom uuids.
Fixes: QTBUG-72681
Change-Id: I22d87b84bf3958ecce9b6020e3323f1e6c6a9255
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Ie9c7b69090355a65a5e175e02b6d39c0e0552fa9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qt DBus registration for Bluez specific types was done by isBluez5().
However Qt 5.12 introduced bluetoothdVersion() which is a bit more
precise. It became necessary because runtime decisions based on exact
minor release versions of Bluez became necessary. Therefore some code
paths (depending on the user's use case) never called isBluez5() anymore.
Subsequently the dbus registrations were missed out on.
In the future isBLuez5() should be replaced by bluetoothdVersion().
QBluetoothSocket changed its underlying implementation when addressing
QTBUG-68550. It uses dbus sockets to establish rfcomm socket connections
to remote devices. The QBluetoothSocket::connectToService() overload that
expects a port number is no longer possible as Bluez DBus API does not
support connection establishment based on port numbers.
Fixes: QTBUG-72742
Change-Id: If6adb391b0524cabc3a702d761e0cbd263508396
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Id27c2c0eff4731b075d952328404fe9550487cac
|
| |
| |
| |
| |
| |
| |
| | |
Move all i-vars into implementation part of declaration.
Change-Id: I9ee71bc85308d899871dc680d438c504e591b091
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Trying to do several things (for example, discovering chars on
several services) in non-sequential manner is allowed but will
result in the broken 'object under watch' logic and thus a
failure to report some operation finished.
Task-number: QTBUG-72487
Change-Id: I9674f93e0c4d5cbfd50ac2f828d0d650031e056c
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. We move the logic 'object we are watching after and the query's type'
into the GCD timer, since we'll need several timers in osxbtcentralmanager
(and after all it's not a timer really, it's 'a timeout watchdog' more like.
2. Move i-vars into the implementation to suppress compiler warnings.
Task-number: QTBUG-72487
Change-Id: I090e4cc2e0e747211aae8ec91c4e0ff4a53f570b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Found by ICC:
warning #68: integer conversion resulted in a change of sign
Change-Id: I4ac1156702324f0fb814fffd156f81e163e3d4d2
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I337d146591585cfae67122b030b72f6f83986b76
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using a Q_GLOBAL_STATIC here fixes an issue in the auto tests for winrt.
If we use a static object that is created before the QCoreapplication has
been created, TagActivator's timer will complain, that it was not created
inside a QThread.
By postponing the creation until first usage we can avoid that problem.
Change-Id: I9beca89930bfca2c71e0fce3d9c000dfcb71f431
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We have to add relevant test data to TESTDATA and use them from the
created qrc file.
Change-Id: I72ed86e09caf518f3f1b830ab4fec104a81313e6
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Id42e98826b0a992e80b84f91b3b5026d60e2699d
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch updates the QQmlNdefRecord code to use
QRegularExpression in place of QRegExp which is to be considered
deprecated.
Change-Id: Ibfbab39ca84f9e89d6f6bd2e15000359a4218234
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
GCC 4.8 doesn't like duplicate friend declarations.
Change-Id: I2ec48ca7415b9fd7fe1c24f390519833b7d1f0aa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|