diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-05-26 15:24:45 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-27 12:59:03 +0200 |
commit | d4537ea1e887510cce1d42437b92f26b52e30d71 (patch) | |
tree | 0b371b31303e696628ad5cea54dff1bdfcfa6d2d | |
parent | d1d2fcff097104a53750b0bf1e1129a4d1c0ed7d (diff) | |
download | qtconnectivity-d4537ea1e887510cce1d42437b92f26b52e30d71.tar.gz |
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>
-rw-r--r-- | src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp index a842d3d9..08343a7d 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp +++ b/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp @@ -310,7 +310,7 @@ QVariant QBluetoothServiceDiscoveryAgentPrivate::readAttributeValue(QXmlStreamRe } xml.skipCurrentElement(); return QVariant::fromValue(uuid); - } else if (xml.name() == QLatin1String("text")) { + } else if (xml.name() == QLatin1String("text") || xml.name() == QStringLiteral("url")) { QString value = xml.attributes().value(QLatin1String("value")).toString(); if (xml.attributes().value(QLatin1String("encoding")) == QLatin1String("hex")) value = QString::fromUtf8(QByteArray::fromHex(value.toLatin1())); |