| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
If the public class is deleted pending lambda invocation can cause
crashes unless QObject context is provided. This fixes a regression
introduced by 819bb06c2cb3372cb1bb9ddd7f3a504f78d3452d.
This was discovered while investigating QTBUG-71479.
Change-Id: I3a49916ce6d9425c684863bb0b04a10bd3e652b9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some cases use the Q_PRIVATE_SLOT logic which does not require QObject
inheritance. Those cases were converted to lambda logic to avoid need for
QObject inheritance.
The Q_PRIVATE_SLOT macro was removed from qbluetoothdevicediscoveryagent.h.
This is not a BC problem because the macro expands to nothing. Only
moc recognizes the pattern.
Change-Id: Ic7cb4cde397f9b230b6fd0b4046e59e504583e58
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I7dd2d055c8d667f049d7cb2c371619137bf76030
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
| |
To avoid unnecessary copies, const is used wherever possible.
Change-Id: Ic743716512751cfd24fad5bd37c244b115dd26fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
| |
Found by Clang:
qbluetoothservicediscoveryagent_bluez.cpp:61:20: warning: unused function 'convertAddress' [-Wunused-function]
Change-Id: I27b55fdf514247549455fffd14b1793f89f60f92
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| | |
Change-Id: Id8dffff9bb75db396aabf6da2a3acb78505a6476
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: I856c13e2a6d4d12c46e1286b0ca1c092ee4608f8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|/
|
|
|
|
|
| |
parameters to avoid unnecessary data copying.
Change-Id: Iaca94a2af27d5d756deb9751c6bc9630f5fbc8bf
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Decrease complexity from O(N+N*logN) to just O(N) for cases like
foreach (Key key, map.keys())
Value value = map.value(key);
, by rewriting with use of iterators.
Change-Id: I81f1334797f16b624293fcebdee885b2be3c89f1
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To enable service discovery for known devices even if
org.bluez.Adapter.CreateDevice has security restrictions, call
org.bluez.Adapter.FindDevice first and CreateDevice only if the device
isn't already known.
The change is needed due to runtime security checks on Jolla devices,
but reordering the calls does no harm when used with upstream
bluetoothd.
Change-Id: I8ad09808cec648f5b5949044c60173ff1ad46332
Task-number: MER#1225
Done-by: Hannu Mallat <hannu.mallat@jollamobile.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
| |
QDBusPendingCallWatcher will leak if it isn't deleted.
Change-Id: I5571dfbc087f54308193dc89127e974e6d2e9275
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|\
| |
| |
| | |
Change-Id: I177affc6c60fd3cc55e914a7ea2a9aeba260906f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The list of internally discovered devices was already cleared. It should
not be referenced anymore. Furthermore the QBluetoothSocket is
killed while its internal QBluetoothServiceDiscoveryAgent is still
running. This change stops the agent as well and thereby
prevents more QBluetoothSocket slots froms being invoked and a more
controlled termination of QBluetoothServiceDiscoveryAgent.
[ChangeLog][QtBluetooth][Android] Fixed crash in
QBluetoothServiceDiscoveryAgent on Bluez 5 when using single device
discovery. Single device discovery is used during
QBluetoothSocket::connectToService().
Task-number: QTBUG-44930
Change-Id: Ib3129c492151a3fe12b0c451cf5ffdddc62d001c
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I3822a6484e8f7a420330de1cb1aeb0c3d1cf41b7
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
|
|\|
| |
| |
| | |
Change-Id: Ia70c3fe64e2ffcb27181bf912b06e6af59d2bc92
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The example immidiately destroys the QBluetoothServiceDiscoveryAgent
when the user selects a remote chat service from the remote selector
dialog. This may happen even when the scheduled QtConcurrent call
to runSdpScan() was still pending. The subsequent signal callback into
the deleted parent caused a crash.
Unfortunately QtConcurrent::run() returns a QFuture which does not
permit stopping the pending thread execution. Therefore the runSdpScan()
had to be rewritten using QProcess to properly destruct pending
calls.
Change-Id: I1ed5e147feb94a26240901a02d836056eddabbf6
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is much safer and cleaner.
[ChangeLog][QtBluetooth][Important Behavior Changes] Q_DECLARE_METATYPE
added for QBluetoothServiceDiscoveryAgent::Error,
QBluetoothSocket::SocketState, QBluetoothSocket::SocketError and
QBluetoothDeviceInfo. This breaks source compatibility if application
code has defined the above metatypes already. The applications
Q_DECLARE_METATYPE must be removed to fix the compile error.
Change-Id: I1c7cb1ee25832b7e5337c9aca6f36b21e8caf22e
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
At the same time we fix up some cases where the ProtocolDescriptorList
was not a list within a list.
Change-Id: If0ec6cf6374902a47a905edd08523906be9fd86b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
There is no need for this class anymore as QBluetoothServiceInfo
covers the same information.
Change-Id: I411a8abb68b34a3a4893a67ee9fac096f44bbd62
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several bugs prevented QBLuetoothServiceDiscoveryAgent from properly
working on Bluez5
1.) If parseSDPRecord returned an empty QByteArray we continued the
parse loop without further advancing the sdpResult list.
2.) Each sdp result was individually base64 encoded but the library
side decoded the entire list of items in one go. The item separation
gets lost during the transfer. As a result only every second item was
properly decoded. Therefore only every second sdp record was properly
recognized. Now we encode the entire result and transfer it in one go.
3.) Don't separate the xml items based on their size anymore. Although
this is possibly slower it is a lot simpler to understand
and debug. In combination with the above two problems the previous
pointer based logic was leading to crashes too.
4.) QProcess::readAll() seems to loose data when the process
finished and the output was very large. After this patch we start
reading right after the start of the sdpscanner.
Change-Id: I84a0be9d68e86c851945751c576a3ccf755db883
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
|
|
|
|
|
|
|
|
|
| |
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL
Change-Id: I7a8b8b787fcae9a178794364efdefe1021d10b1b
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
|\
| |
| |
| | |
Change-Id: I1e79c96602d0da2c2d36d6217bdfe7ff183e6df9
|
| |
| |
| |
| |
| | |
Change-Id: Ieecf341918ffdc51c359fed4969ef6c3998d83b8
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
It never worked and was not used. In the future there might be a new
GATT DBUS API offered by Bluez.
Change-Id: If4c05d37e330ff3cdcda3ef3458938e2bce30725
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The subsequent patches will rename QLowEnergyControllerNew to
QLowEnergyController and fix up the documentation fragments which still
point to the old API.
Change-Id: I084e6b1a85a17f424702018f3ad7047bda35d46a
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
| |
| |
| |
| |
| | |
Change-Id: Idc04620c3941ec92c7ea81e1ba4ec521cf000720
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
Change-Id: Ib960b9e8d8800af84d2094bdf26c2652d4c81dba
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
src/bluetooth/qbluetoothlocaldevice_bluez.cpp
src/bluetooth/qbluetoothlocaldevice_p.h
src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
Change-Id: Ifb0c01eb8bffbffcd2416ea8d7bf1d36eb1c70f2
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bluez5 advertises the following SDP attributes
- QBluetoothServiceInfo::DocumentationUrl
- QBluetoothServiceInfo::ClientExecutableUrl
- QBluetoothServiceInfo::IconUrl
They come as <url> xml tag but otherwise follow the <text> syntax.
So far this type of xml tag was unknown, a warning was printed
and the service info didn't contain the relevant info.
Although Bluez5 seems to be the first to advertise this attribute,
Bluez4 has to be able to deal with it too. Hence this patch goes
to Qt 5.3/stable.
Change-Id: I216fdaee23c75b1ed86702086be2d95a0efe109e
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bluez doesn't seem to know the service class uuid 0x1200 which seems
common on BB10 devices. Ensure that we set a name if Bluez did not
provide a name. This was made possible by the recent addition of
QBluetoothUuid::serviceClassToString(..).
[ChangeLog][QtBluetooth][QBluetoothServiceDiscoveryAgent] Fixed
cases where Bluez doesn't provide service names for given Bluetooth
service class uuid.
Change-Id: Ife56ab878f70ca6226e907f59972368c79318bec
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I59aa5241d33191a8ca8cc167263b63b024f52754
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a regression introduced during the Bluez5 port. During the
service xml parsing we may encounter an invalid service info. This does
not mean the next one is invalid too. This bug caused the service
discovery to abort.
Change-Id: If51e0f898d83e99ba0a279c13ccaa3e5947bb6bf
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
examples/bluetooth/bluetooth.pro
src/bluetooth/bluez/bluez.pri
src/bluetooth/doc/src/bluetooth-index.qdoc
src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
src/bluetooth/qbluetoothdeviceinfo.cpp
src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
src/bluetooth/qbluetoothservicediscoveryagent_p.h
src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp
Change-Id: I88b22c51a4ee95b067ef8d2b2fddb5cbff4566f8
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
They can be found in /usr/include
Change-Id: I734fd72c52d2b78aca6388d79e59c973e8d99a73
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This was triggered when the stop() call was made while the SDP thread
was talking to the SDP server.
Change-Id: If6624dce21ca4a099d5beae064685b6b3a907989
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I00701e9103a6acfdfc2697949280f8a7de8bcdfe
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This avoids unnecessary code duplication.
Change-Id: I9e49cf3c5e524cf7b3ef811b4640d5248c2ba1b0
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
At the same time we shift the ServiceClassUUID to service name mapping
to QBluetoothUuid. It was used by Android and now Bluez 5 uses it too.
Task-number: QTBUG-32085
Change-Id: I9f2d4dc4e2997683485f2ba7aaefb646cb72fb75
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
|
| |/
| |
| |
| |
| |
| |
| |
| | |
The only exception are generated files and cases where
QLatin1String based overloads are used (e.g. during QString comparisons)
Change-Id: I6f36789fb8acb3b30c1dc1f8a920b118a979d74f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Convention is that calling QBluetoothServiceDiscoveryAgent
maintains an internal list of discovered services. When start() is called
already discovered services are kept unless clear() was called. The Bluez
code never checked which services were already discovered by previous
discovery runs. This patch fixes this problem.
Change-Id: I3987d6ea65ea41aefc9726acc31f6abaa478c72c
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This simplifies the internal LEServiceInfo logic and let's us later deal
with multiple adapters.
Change-Id: I7d3e991207cd6571b5d644ae99c6bf1a2c99ec68
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/bluetooth/qbluetoothuuid.cpp
tests/bttestui/btlocaldevice.cpp
Change-Id: Id16ab93ec61361950669da7eb232769c5dc4644f
|
| |
| |
| |
| |
| | |
Change-Id: I4beb72aac294511b87ef95c459c52daa85c62499
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A valid LEServiceInfo on Bluez requires an adapter address. If the
service discorvery was initialized with a default adapter,
the internal service discovery never actually determines
the adapter address. Subsequently every LEServiceInfo object got an
invalid adapter address.
Change-Id: I3d95ee5b2169f8a049121fe6cc4591d3b79262d9
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
| |
| |
| |
| |
| | |
Change-Id: I7c79a7ca1f29ca428509847a7e32a4b0d157c018
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1.) In Bluez avoid incomplete and/or premature finish of service
discovery process.
2.) Add Testcode for
QBluetoothServiceInfo::serviceDiscovered(QLowEnergyServiceInfo) to
bttestui application
Change-Id: I037a6303862dcf2e29aef4b761731b13c85b29aa
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
examples/bluetooth/bluetooth.pro
src/bluetooth/doc/src/examples.qdoc
src/bluetooth/qbluetoothdevicediscoveryagent_qnx.cpp
src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
src/bluetooth/qbluetoothservicediscoveryagent_p.h
src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp
Change-Id: Ie1577e4b0f469cd5a6b05a61cbe94f180a64448d
|