Minor changelog clarification and other "nice-ifications"

Change-Id: I1eee55a970a7ed5e1813d70ec254ed0348d1e567
Reviewed-by: Oleg Shparber <trollixx@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Fix uncategorised usage of qWarning().

Change-Id: Iee8b8e619f1679fe9b6e8aed47d05f7414417043
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: Ia3c8079ad2c35f9573d8a59347af281275232e30
Add a few Qt 6 TODO entries

Change-Id: Ic169d907b872fd277df4f32be1270d7bceabac32
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Process Bluez5 URLs during SDP scan

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>
Bluez4: Ensure QBluetoothLocalDevice becomes invalid if adapter disappears

The DBus object disappears when the dongle is removed. Once a
QBluetoothLocalDevice instance is invalid it remains invalid.
The patch further ensures that an invalid instance does not
initiate pairing activitiy.

Last but not least this patch fixes a memory leak in case
a DBus error occurs during the adapter initialization.

Task-number: QTBUG-38399
Change-Id: I2e13e393060c77fab5f79d5451dd6fe9a2a6e3bb
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Compare the NDef records without using qHash

It seems Windows produces a different hash value compared to
other platforms.

Change-Id: I73669894d63ffca08dbc6ed010e923050a0c8e8f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Bluez5: QBluetoothLocalDevice becomes invalid if adapter disappears

Bluez5 supports org.freedesktop.DBus.ObjectManager interface which
permits monitoring of removal/addition of Bt adapters. This permits
the invalidation of the current QBluetoothLocalDevice instance. Once the
instance is invalid, it will remain invalid. Otherwise we could have a
switch of the adapter without the developer noticing it because the next
Bt dongle could get the same interface path. This would
violate the sense of identity that is attached to a
QBluetoothLocalDevice instance.

Task-number: QTBUG-38399
Change-Id: I007278ff1f94c48d6e6902959132088858b0d011
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Don't stop processing of Bluez services if one service is invalid

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>
Bluez5: Add service (un)registration support

The Bluez5 DBus API does not permit the selection of the
local Bt adapter when registering a service. This means that
if the local device has two Bluetooth adapters the service will be
advertised by both adapters. This leads to cases where
the QBluetoothServer::listen() call binds the socket on one adapter
but the remote device tries to connect to the other adapter.

For now this is an acceptable behavior since it is rather rare to
have two local adapters at the same time. A potential future fix is
tracked by QTBUG-39012.

Task-number: QTBUG-32085
Change-Id: Ibb24edc5b9d1c25a005aedd98f6fc5d0d11b60f8
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Bluez5: Simplify lookup of default adapter

Change-Id: I59aa5241d33191a8ca8cc167263b63b024f52754
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Avoid empty service names

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>
Streamline some of the QLowEnergyDescriptorInfo related code

1. QLowEnergyDescriptorInfo::type() added
2. QLowEnergyDescriptorInfo ctor signature modified
3. QBluetoothUuid::DescriptorId enum renamed
4. QLowEnergyDescriptorInfo::uuid() changed its meaning
5. QBluetoothUuid(CharacteristicDescriptor) ctor added

Starting from this change QNX is going to be broken. In particular
point 2 cause breaks or bug. The focus is on santizing the API at
this point in time.

Change-Id: I7838f550410b6a0f94026b68ecf0751533eba3cb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Cleanup of BTLE classes

There are a lot of unused internal variables and helper functions which
are left-overs from the last code rearrangement.

Change-Id: I48d6e6aa015dea628d2467141ea1e44814d228c0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Improve handling of QBluetoothUuid::CharacteristicType enum

- Sort enum values based on their hex values
- Add QBluetoothUuid::characteristicToString(CharacteristicType)
- Rename QBluetoothUuid::CharacteristicDescriptor -> DescriptorType
- Add a couple of missing \since tags

Change-Id: I9724eb2f43c6978f07420bf6ec4c8557ad9efbaf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Fix BTLE related qdoc errors

Change-Id: Id1a56b0ed050fd9cebee8738351e560b442d748f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Rename permission related API in QLowEnergyCharacteristicInfo

1.) Rename QLowEnergyCharacteristicInfo::Property to
QLowEnergyCharacteristicInfo::PropertyType

2.) Rename permissions() to properties()

3.) Return PropertyTypes as return value for
permissions()/properties()

Change-Id: I5c4037876047354fd691cadc54d3ac6098db4522
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
QBluetoothDeviceInfo::coreConfiguration() should return the QFlag

Function name was slightly adjusted to reflect the fact that it's a
flag.

Change-Id: I9c1a2fe64b93c7ae7bd826d856f8b87f985d7473
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Add changelog for upcoming Qt 5.3.1 release.

Change-Id: I8343a3a474e3b6378b24c08182d767262111ec19
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Enable and fix the BTLE related unit tests

It seems they were added but never enabled. Due to recent API changes
they didn't even compile.

Change-Id: Ia2d8f6c87f5f02728b1e6451e828ff88bb4527d0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>