ndefMessagesWritten signal basically duplicates the requestCompleted
signal, but does not provide a request id parameter to track, which
messages were actually written. Given that, the signal is removed. One
should now use requestCompleted and check the request id instead.
[ChangeLog][QtNFC][QNearFieldTarget] Remove ndefMessagesWritten signal.
Use requestCompleted signal instead.
Task-number: QTBUG-93854
Change-Id: Ic7f97eabfa83879b0da0cf34310a2982621cf8de
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
The cmake test verifies the basic building of applications outside of
the repository. This is an important test as it is similar to how
the typical users of Qt build their projects.
Task-number: QTBUG-92967
Change-Id: I6f15a6270e76db855f387697eeb7faec23bbaf7e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We don't need to find_package Qt modules here.
Change-Id: Ib484b4da2cf00145f63f7e6fa6e2614225419d35
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This generic name conflicts with targets for other modules.
Change-Id: I623fb03b57cc04d06bf756fd1366835f7806a5af
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
In the future, discoverDetails() should become optional.
The state of a QLowEnergyService after its creation should have
a name which does not imply it is not functional yet. This patch
changes the name of the initial state from "DiscoveryRequired"
to the neutral "RemoteService".
Task-number: QTBUG-75340
Change-Id: Ib407e60f5fc7264a04a124561dacbcebb01bf252
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
lowEnergySearchTimeout is still initialized to -1 in
qbluetoothdevicediscoveryagent_p.cpp to signal, that this "backend" does
not support le scans.
Change-Id: Icdde8693fc0de79d2b91867e3a98b883000293df
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Unit tests wait for BlueZ to come back after at most 20 seconds.
On Andreas' machine, BlueZ scans for about 25 seconds, causing
tests to fail. This patch increses the timeout to 26.5 seconds.
Change-Id: I4cabc6a20231cb7d148660b2d951ba77b32c0a2f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This patch changes QBluetooth::Security and
QBluetooth::AttAccessConstraint to be scoped
enums for improved type safety.
Fixes: QTBUG-91906
Change-Id: Ife4797aa8e106690a10e4fcb7f623877023fbb3c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Change in initialization in 87f6d3603b
broke tst_qbluetoothdevicediscoveryagent. The test was looking for
the string "Bluez 5" in the debug output, which is not produced any
more. This patch removes the logic to distinguish between BlueZ 4
and BlueZ 5 from the test, always assuming BlueZ 5.
Change-Id: I8f6cba66ac89f03493a765f4f32b868970e9b666
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Currently, there is a name clash between the error getter and
the error signal. This leads to extensive use of qOverload or
similar. This patch renames all error signals to errorOccurred
to resolve this.
Task-number: QTBUG-62877
Change-Id: I615e2405f855433b6e142d820072c4d3f35ae28f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
The manual part of the test requires the user to accept pairing requests
on both devices. Typically this requires the acceptance of a system popup.
The user action requires time and the given timeouts were not sufficient.
Furthermore the use of QTest::qWait() is inefficient because it
waits exactly for the requested amount of time without taking into
consideration that the process may have finished (as highlighted by the
relevant signals). That's the task of QTRY_VERIFY_WITH_TIMEOUT.
30s is the wait time for waits related to manual input and 5s is the
timeout for automatic sections. The latter value is based on the fact
that the previous QTRY_VERIFY uses those 5s waiting time too.
In summary, the test increases timeouts but at the same time blocks the
entire test for a much shorter time frame (and therefore requiring
much less time to execute in total).
Change-Id: If2b21af4949f34c4f15e7794e21c002b24605e91
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The API was never completely implemented across the platforms. At least
windows and macOS do not provide the APIs to do that. Android requires
BLUETOOTH_PRIVILEGED permissions for pairingConfirmation() which is not
obtainable for regular apps. BLuez5 was never implemented and Bluez4
support has long been obsolete.
At later stages we might bring similar API back via some sort of pairing
agent API. This API would definitely be not cross platform.
Fixes: QTBUG-91477
Change-Id: I7f8ece6fabf14a3357c6275891c66c70ccba1d89
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
QBluetoothSocket enum values were tied to QAbstractSocket enum values.
But there is no dependency, the coupling is not required. This patch
removes the coupling and changes to scoped enums for improved type
safety.
Task-number: QTBUG-62877
Change-Id: I206b1d438d74b976d3e0d32da5713d22b597dd90
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
QBluetoothUuid contains enums for ProtocolUuid, ServiceClassUuid,
CharacteristicType and DescriptorType. So far, they all
put their constants directly into the QBluetoothUuid
namespace, making it easy to mix them up. This patch changes
those to scoped enums. That way, each enum has its items in
its own namespace.
Change-Id: I86ea08ff31009dc8073d84cfe678e27920d693f7
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Only two failures during SDP discovery were allowed. If more than
two devices not supporting SDP are in range, the tests failed.
This is often the case. This patch changes the code to allow
for any number of non-SDP supporting devices in range.
Change-Id: I299cda56858b04f5077929365f2e6e096f11ef1a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Some bluetooth devices are found multiple times, leading
to tst_qbluetoothdevicediscoveryagent to fail.
This patch fixes the test.
Change-Id: I5bb2a0758a904387855f05b769612267ac6256b9
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
QtBluetooth used QtConcurrent internally in the past.
This is no longer the case. The dependency can be removed.
Fixes: QTBUG-89494
Change-Id: I7e0657f79bc02ec794311d25d245a7ae5cef02e7
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
After updating to firmware revision 1.50, the temperature service
still exists, but it does not provide any values. Tests which use
it fail.
This patch changes the tests to use the humidity sensor instead.
Change-Id: I996518da3a10b6d5ce9a9ca052a532d8c449c60a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This patch removes QBluetoothTransferManager,
QBluetoothTransferReply and QBluetoothTransferRequest.
Furthermore, the examples "btfiletransfer" and "picturetransfer"
are removed.
Fixes: QTBUG-75353
Task-number: QTBUG-62877
Change-Id: Ife192d80196249185df877fb6a4cae317d7e44ad
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
tst_QBluetoothLocalDevice was flaky. It turns out it queried
the number of available bluetooth adapters in each test. When
no bluetooth adapter is present, this call first tries to
contact Bluez5 and times out after about 20 seconds, then it
tries to contact Bluez4 and times out after about 20 seconds.
This patch fixes the problem by only asking for the number of
bluetooth adapters once and then reusing the result.
A better fix will be available in the future, when Bluez4
support will be dropped.
Change-Id: I2c478479f754bcc8b08e83560b5a78c6060e2329
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.
Pick-to: 5.15
Change-Id: I1df4e68136b8a83640af1fc50298e559d983cc9a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
The general access to QLEController is via createCentral() and
createPeripheral(). The direct access to deprecated ctors was
removed. Furthermore all controller initialization must happen
via remote QBluetoothDeviceInfo parameter. The QBluetoothAddress
parameter cannot be used anymore as Apple devices do not
expose Bluetooth addresses but use a device specific UUID. Only
QBluetoothDeviceInfo provides this ability.
While converting the existing unit test to the instance factories,
the opportunity was used to instanciate QLEController
via QScopedPointer's. This removes memory leaks and brings the code
base more in line with the idea that QLEController is handled via
instances and factories returning pointers.
[ChangeLog][QtBluetooth][QLowEnergyController] Made QLowEnergyController
ctors private. The createPeripheral() and createCentral() factories must
be used. Furthermore all instance creation must use QBluetoothDeviceInfo
parameters for remotes due to missing cross compatibility on iOS and macOS.
Task-number: QTBUG-75344
Change-Id: I21edcc32a02a9ed9574241d80c5a79e7aca6da87
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
To use CMake only in the future to build QtConnectivity, all
the traces from the qmake->CMake conversion can now be removed.
This patch deletes all ".prev_CMakeLists.txt" files, in deletes all
"*.pro" files and it removes all "special case" markers in
CMakeLists.txt files. "special case" in "*.cmake" files are kept.
Change-Id: Ia0f5d4de5d77b9f2e5cc8d97fc8f04077e042a6f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Additionally use typeId() directly instead of userType() as they do
the same thing.
Change-Id: Icae3a05421e1ccfe4de9e32bbb5fc51925d75cfb
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Recreated all CMake files in QtConnectivity using
run_pro2cmake.py . --only-existing -- --api-version 3
Furthermore, port bttestui to CMake.
Change-Id: Idb55f1b4c1cff30d7824a42e3ee6923c39e698df
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
On iOS it is only possible to search for one type of tags at the time.
See https://developer.apple.com/documentation/corenfc/nfcreadersession
On Android the access mode is controlled by the Intent filter the user
needs to set. So we check the target before targetDetected is emitted.
In the future we will add the readerMode, so we can also avoid the
scanning for wrong tags.
https://developer.android.com/reference/android/nfc/NfcAdapter#enableReaderMode
Task-number: QTBUG-81824
Change-Id: I5aa2580ada619363560cdad354a3a0be4998ea96
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Change-Id: If702a7dfeeb94dac98122495a96ae82304e22d64
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Change-Id: I4ef69cd51cfa975d60de1d2c817f3827737d03c4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Result of reruns of pro2cmake, some manual fixes after the merge and one
addition of the missing AndroidExtras dependency for Android.
Change-Id: I5a124c51d0cb9be5767ee7185744aa0694cc2c7b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This change is motivated by the TODO from 1421e4c482:
"The mimetype should be QString as it is UTF-8"
Task-number: QTBUG-81824
Change-Id: Ia6f345da3602dceef29fa108ac7fedbf29e9b70f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This allows binary compatible changes in the future.
Task-number: QTBUG-81824
Change-Id: I25a5028f7cb0129de5b7ecb5b5e0c2035fcab554
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This removes the property itself and all related public API interfaces
(incl. InquiryType enum, property getter and setter).
[ChangeLog][QtBluetooth][QBluetoothDeviceDiscoveryAgent] Removed inquiryType property
and related API elements. The property was never implemented except for the publicly
facing API.
Task-number: QTBUG-75344
Change-Id: I775f74615294646fa8f7ee9801df2f6c6919e56d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The removal is proposed by a comment in qNearfieldmanager.h.
[ChangeLog][QtNFC][QNearFieldManager] Removed functions
(un)registerNdefMessageHandler(...).
Task-number: QTBUG-81824
Change-Id: Icf9dc4746a437a775ac40bbe68814daabd1ec13f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Move the functions from QNearFieldManagerPrivateVirtualBase
to QNearFieldManagerPrivateImpl. There is no need for
QNearFieldManagerPrivateVirtualBase in the inheritance hierarchy.
Task-number: QTBUG-81824
Change-Id: I87e9261f03313df9c157c8ba4ab78dda50da8929
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
When using QNearFieldTarget::sendCommand on Android an exception can
occur. In this case reportError is called and handleResponse is omitted.
A call to QNearFieldTarget::waitForRequestCompleted will result in
a full usage of the specified timeout, even if the exception occurred.
To avoid this behavior also add an (invalid) response in reportError.
Change-Id: Id80b7a97da5628d229b942803ec1a2fb13536d99
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
BC files built against 5.14.0 added.
Change-Id: Ida4b77e83f39e69271133a11a5cdaa03ec844ad5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
tst_qlowenergydescriptor::tst_assignCompare() could fail due to a dependency
on a particular characteristic found in a BLE device used for development
tests. It should work regardless of it.
Fixes: QTBUG-79492
Change-Id: Ia0d640b547c1170523e7b9304c7de175da432886
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>