| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I2532675be638730834130d831f0cc34632bb2b31
|
|
|
|
|
|
|
| |
Task-number: QTBUG-62710
Change-Id: I2d1e23e0073d3ec1d2f86f48051e5c9f40ffb5ad
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit c6a928aa631290ffefb3a241d7fb1bfa768eef32)
|
|
|
|
|
| |
Change-Id: I4b75aabbfcffa38e70357fe67d49ff0746249f62
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
| |
Change-Id: I641f125ad06fb38692ad9abfd3d96f28bdf0cc1f
|
|
|
|
|
|
|
|
| |
This caused a compile time error when using clang.
Task-number: QTBUG-55297
Change-Id: Ic899a225852e05b4302812f007ff08964b03e90d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
| |
the CI obtains them from the qt5 super repo nowadays.
Change-Id: Idb89a6e24cc3a9ac38260f990ea953e5cdffbcbb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In general BluetoothAdapter.getDefaultAdapter should not throw an exception.
If the device does not support Bluetooth the function should return a
null reference only.
However some devices throw a RuntimeException as well. Specially the
smartphone HTC 10! Even that phone supports Bluetooth.
So we need to catch it to prevent unwinding of the stack.
This fix is a sibling of 669b427653f8f708269431917f720f7e76680191.
Task-number: QTBUG-45066
Change-Id: I6d5f71e5cc988eed02ae35665b6ef6c9e8769868
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
| |
'state' is an instance variable (the type is LEInquiryState), that holds the
previous inquiry state, while testing manager's state, we must use a local
variable 'cbState' (CBCentralManagerState) instead.
Change-Id: Ie1c4dbdb4fae571c94d7565a8de78657e252de7b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- With recent SDK changes CoreBluetooth is not in IOBluetooth anymore.
This makes corebluetoothwrapper_p.h even uglier, now we have to care
about v != 10.9 && v < 10.12; v == 10.9; v >= 10.12.
- Using osxbluetooth_p.h we can get rid of forward declarations (for
Obj-C classes) and weird includes like <IOBluetooth/IOBluetoothRFCOMChannel.h>
- use osxbluetooth_p.h instead (and it will correctly include
IOBluetooth/IOBluetooth.h etc.).
Change-Id: Ia85ef2e2cc1ac7b15a58864ed25d85a0772e5c86
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-56294
Change-Id: I2c27a050294e611f6ee540dbc58cf7f8b30b3fdf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
This patch adds missing includes that allows to build the module with
the 10.12 SDK and Xcode 8.
Change-Id: Ieab48f6a0582b916ceecbbb9a01a4169d6ba53f5
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|
|
|
|
|
|
|
|
| |
iOS 10 (and tvOS 10) deprecates CBCentralManagerState enum
(and associated values). Replaced by CBManagerState enum.
Change-Id: I1c1bb0691403deaa6330949516846961c76865f5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ib96e704316d0a93615505a07e2134f713e05deb8
|
| |
| |
| |
| |
| | |
Change-Id: Id0c8f14ef466011a3fec0db1f3042e5f540eeaa3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|/
|
|
|
|
|
|
| |
Added binary compatibility data files for tst_bic test
Change-Id: I637ff03da3ca76dac8750f5a0480d61e267e850e
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attempt to connect to a service using a socket with UnknownProtocol
socket type will fail, but can result in an incorrect UnknownSocketError
reported and also can start a device discovery (then finally failing to
connect after all). Check this condition early before trying to actually
connect/do device discovery and report error properly
as UnsupportedProtocolError.
Task-number: QTBUG-55073
Change-Id: Ib39e1ca7ad401e07d6387201a4664a1185d38d39
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
As of version 10.12 (Sierra), the name of Apple's desktop operating
system will be macOS. Change all occurrences where the platform is
discussed to use the macro \macos (defined in the documentation
configuration in qtbase).
Change-Id: I97f7a0d6d2ca351395bed518f01d4365b986500a
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SDP based scans and LE scans can find the saame device (address) with
different device names. This is caused by the fact that different
channels are used to retrieve the information. Those two channels
can advertise different device names.
Before this patch the first entry was added to the list of discovered
devices. When the second entry with different name came about, the
entry was never added to the list of discovered devices. Nevertheless
the deviceDiscovered() signal was triggered each time. This lead to a
situation where application which were listening to the signal only
never noticed the duplicated entries and showed a new discovered
device each time the address matched but not the remainder of the
device info.
This problem was made worse by the fact that the LE scan on Android
continues to fire the new device discovered signal once per second.
This patch distinguishes devices with the same address but different
names. They are treated as separate entries now.
Change-Id: I77259a888708309338110831e86bb7ce9253f2a6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QBluetoothDeviceDiscoveryAgent did not extract the
QBluetoothDeviceInfo::majorDeviceClass() and QBluetoothDeviceInfo::minorDeviceClass()
information.
The Android API provides info for all major device classes. However not each
major device class has its set of API for the minor device class information.
Caching is applied to match Android major device class values against their matching
Qt enum. When a matching entry is found, the value is added to the cache.
In principle, the mechanism is applied for minor device class values.
However since there are many many more minor device class fields, the caching
is a bit more proactive. The patch will proactively read and cache all minor
device class values for a given major device class. This avoids a large
overhead of very long if..else if...else if..else statements.
Change-Id: I26a6c29c6f5dca6d4f3b4b25902cda03a10ae5de
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
| |
A naming inconsistency was discovered and a related Qt 6 TODO was added.
Change-Id: I171f8480009a3fc8c3ddc39cc2da03cf4a6eb9db
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since Android 5.0 Google introduce a nasty bug[1] which calls
JNI_OnLoad more than once.
Basically every time when a library is loaded JNI_OnLoad is
called if found, but it calls *again* JNI_OnLoad of its .so
dependencies!
[1] Workaround https://code.google.com/p/android/issues/detail?id=215069
Change-Id: I2894dd24afa9c51582f20ab44d83e9ce86751716
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
| |
Somehow clang fails to properly export the default destructor.
Should be revered when https://github.com/android-ndk/ndk/issues/143 is fixed.
Change-Id: I842f4141f249181ec871634b947e1c08470ddb83
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
| |
The logic for this existed already. However an unintentional name override
and proper QByteArray comparison prevented it from ever being activated.
Change-Id: I73ac6c03b82cfbc11f5d755381ae89a3e8a3d9e5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-54055
Change-Id: Id2c42efe6c916b6f7437cb4c02fbb19430c9a44b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
| |
See http://comments.gmane.org/gmane.comp.lib.qt.devel/25771
Change-Id: If8088468d74b1d5ca87ccb82ce294396383401d1
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
qbluetoothdevicediscoveryagent_p.cpp not needed on iOS, since
for iOS we already have iOS-specific version defined completely in the
corresponding .mm file. This is quite obvious ODR violation, but not
so obvious for compiler/linker apparently.
Change-Id: I7b7d0c9596cccea307ec7acbafbb6cd31b41d885
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the model changes quickly from one discovery mode to the next, the
public device discovery agent and the internal device discovery agent
inside QBlutoothServiceDiscoveryAgent interact with each other. One agent
is shutting down while the other is starting. Since both instances
manage the same hardware, the resulting signals hit the agents in
unexpected states which even leads to random crashes.
The fix is to let one agent stop and only start the next one once the
first has properly shut down. Unfortunately the public BluetoothModel
API acts synchronously via its running property. Therefore the
synchronous running property must be mapped to asynchronous state changes
inside the agents. To achieve this the model uses an internal state
transition table which determines how the next setRunning(bool) call
is to be processed.
As a consequence it is possible to have a non-running BluetoothModel
but the internal agent is still shutting down. Another scenario
might exhibit a running model whereas one internal agent is still
finishing up and the next is waiting to start.
Task-number: QTBUG-51307
Change-Id: I0a471b913b8784d2218a797442cee7ee4d00edf3
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This may happen when the device discovery agent is quickly started and
stopped and started again. If the stop-start combination is happening
quicker than dbus can deliver the Discovering flag of the Adapter1
BlueZ interface, BlueZ's stop response will override the new start
discovery request.
Task-number: QTBUG-53715
Change-Id: I6a03fc525c7f390db009fc68a5313352ebba7f79
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PUBLIC_BROWSE_GROUP scans are not always supported. In such cases
more targeted service scans are to be used. This patch modifies
QBluetoothServiceDiscoveryAgent such that when a uuid filter
is set targeted service scans are used rather than generic
PUBLIC_BROWSE_GROUP ones.
QBluetoothSocket always scans with an applied uuid filter and
therefore directly benefits from the patch.
Change-Id: I94997d2cf8f70fa7db5422d78c8bfdbe2aa1dbbc
Task-number: QTBUG-53041
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-53749
Change-Id: I6e7832b4a5a70bed153fb8b0718b3c66177ffd58
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-53616
Change-Id: Ie3a87abc61100ac8fe0a5b671725f54ae28e1501
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Multiple device discovery agents can influence each other as they
monitor the same DBus BlueZ adapter. When one agent started
and another just stopped/finished the discovery process, the newly
started agent is caught in an unprepared state.
The other use case where this might happen is when one agent stopped
the discovery and another agent goes through the same start/stop cycle
in very quick order, then the first agent may still have pending signals
despiter adapter being deleted.
In any case this patch simply ensures that an already inactive
agent doesn't go through the finishing process again.
Task-number: QTBUG-51307
Change-Id: If0e2b944f1ceadb9037179c4fde2f3f79741d0a5
Reviewed-by: dmnikola <dmitry.nikolaev@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The agent class constructors were initializing the q_ptr member of
their d_ptr; it is cleaner to pass this down to the d_ptr's
constructor and let it do this itself. This also lets Coverity know
that initialization actually does happen (CID 22330). In particular,
it makes sure we can't leave it uninitialized, if an agent
implementation happens to neglect to do so.
Change-Id: Ie01046a5a113b5669e8e63c6a22f692cd3943ac0
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
This happens when the Android device does not support BTLE. Previously
the device search agent progressed even when it claimed that it was
done already.
Change-Id: If14df70bba02703f5feb8bc9c0569f596defede9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The error(), finished() and canceled() signals notify the user about
internal state changes. Signal handlers may call back into the same
class instance that just emitted the signals. If the instance did not
cleanup its internal state then the sudden reentry can cause weird
behavior.
Adds a comment that the pendingCancel & pendingStart behavior is
to be removed in Qt6. It has little advantage and cuases lots of
headaches. Unfortunately all backends exhibit the behavior and
therefore every backend has to change accordingly.
Task-number: QTBUG-51307
Change-Id: Ia5bf9efd0ed27e015361b10499ced069d16a9c93
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The writer wasn't initialized; Coverity grumbled (CID 22323).
Various stanzas take for granted that one or other is set; assert
there. Various stanzas created each afresh, without considering they
might be leaking a prior one; delete first (could probably have
asserted == 0 instead).
Change-Id: I4c792fbbd611e06c28235ceafee40cc18268c60d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
| |
it's done centrally now.
Change-Id: I2f2b9ca69f46d681ebe4c04ddbf836814a4056d6
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|\
| |
| |
| | |
Change-Id: I666ffe72bed5b809d4214f0600da65f6bbfc4609
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bluetooth on iOS needs some of 'default' (or 'dummy') implementations,
but does not want warnings like 'Dummy backend running', as it's
not really dummy. Also, having printDummyWarning calls
can end-up in a linker error since we do not build dummy_helper.cpp on iOS.
The solution is to ifndef all these calls/includes.
Change-Id: I9c64f2bacbc6134ed30d75f85f9df0194add418d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ib6dc3ae3237f4dfcb158f053276ffc4e378acf43
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| | |
Change-Id: I92e3b8f6b3a9a80d0e59040e15c60062e1f49cc2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
|\|
| |
| |
| | |
Change-Id: I210f9a9a06e48a63073f0ef8474fc963ce24936d
|
| |
| |
| |
| |
| | |
Change-Id: If81642830835e45a7465d9872413d1e94953319e
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Fix missing symbol problem on iOS and Android.
Change-Id: I055e0b9db8757ab0e92c640736e9bdb9de48e726
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Examples in binary packages now directly match the install path.
Change-Id: I8fc41af85033c88d6a3129efdb616dac6d99866d
Task-number: QTBUG-52953
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
|
| |
| |
| |
| | |
Change-Id: I1679bc7eb8fc95d598b80f894e973fc1506203a8
|
|/
|
|
|
|
|
|
|
|
|
| |
It seems that some BTLE devices require more than 10s to be found.
This timeout change increases the chances to find slow remote devices.
The user has to cancel if he doesn't want to wait the full 25s.
Task-number: QTBUG-53012
Change-Id: Id9bafbe09528619ac6dff17c33322ef90beb8829
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There have been plenty of bugs where QtBluetooth was compiled
with the dummy backend and the API user reported bugs against it. So far
debug output was not able to identify the dummy backend which made
debugging of customer code more difficult.
This patch prints the name of the backend once shortly after the
application startup. The other backends like Bluez do that already.
Change-Id: I86353ef3c9c99cafac38805f253e20a3ad3e10a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QBluetoothSocket::connectToService() performs its own service discovery
if the remote RFCOMM channel is not known. This may happen if the passed
in BluetothServiceInfo object was obtained via a minimal service
discovery (which does not perform a channel discovery) or if the
connectToService(const QBluetoothAddress &address, const QBluetoothUuid
&uuid, OpenMode openMode = ReadWrite);
overload was called.
This was not an issue with Bluez4 as every type of discovery
provided the RFCOMM channel id.
The internal discovery required at least the service's ServiceId to be
known. However a lot of SerialPort profiles do not set a custom service
uuid as ServiceId nor do they set the SerialPort UUID as ServiceId. Often they
provide the SerialPort uuid via the ServiceClassIds only.
This patch ensures that the internal service discovery is started if the
ServiceId is known or if the ServiceClassIds contains the SerialPort
uuid.
Furthermore the internal discovery did not apply the complete uuid filter.
If a ServiceClassId was added then the ServiceId was discarded which
could lead to services not being found.
Task-number: QTBUG-47593
Change-Id: Ia6e52d1a9def0f770080fd70e2b6deb40e69fa69
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qDebug() << foobar << QBluetoothServiceInfo()
The above statement produced output where the QBluetoothServiceInfo
content was printed before foobar. This patch fixes the issue. The debug
operator uses the passed in debug object rather than creating a new
one when printing.
Change-Id: Ic92ca341baa8b4bce934a3895d2da77a2e17b5c3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|