summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserviceinfo_bluez.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qbluetoothserviceinfo_bluez.cpp')
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_bluez.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/bluetooth/qbluetoothserviceinfo_bluez.cpp b/src/bluetooth/qbluetoothserviceinfo_bluez.cpp
index d8344589..bde3e264 100644
--- a/src/bluetooth/qbluetoothserviceinfo_bluez.cpp
+++ b/src/bluetooth/qbluetoothserviceinfo_bluez.cpp
@@ -45,10 +45,13 @@
#include "bluez/manager_p.h"
#include "bluez/service_p.h"
+#include <QtCore/QLoggingCategory>
#include <QtCore/QXmlStreamWriter>
QT_BEGIN_NAMESPACE
+Q_DECLARE_LOGGING_CATEGORY(QT_BT_BLUEZ)
+
static void writeAttribute(QXmlStreamWriter *stream, const QVariant &attribute)
{
const QString unsignedFormat(QLatin1String("0x%1"));
@@ -163,7 +166,7 @@ static void writeAttribute(QXmlStreamWriter *stream, const QVariant &attribute)
}
break;
default:
- qWarning() << "Unknown variant type", attribute.userType();
+ qCWarning(QT_BT_BLUEZ) << "Unknown variant type", attribute.userType();
}
}
@@ -234,7 +237,7 @@ bool QBluetoothServiceInfoPrivate::registerService(const QBluetoothAddress &loca
unregisterService();
if (!ensureSdpConnection(localAdapter)) {
- qWarning() << "SDP not connected. Cannot register";
+ qCWarning(QT_BT_BLUEZ) << "SDP not connected. Cannot register";
return false;
}
@@ -263,13 +266,11 @@ bool QBluetoothServiceInfoPrivate::registerService(const QBluetoothAddress &loca
stream.writeEndDocument();
-// qDebug() << xmlServiceRecord;
-
if (!registered) {
QDBusPendingReply<uint> reply = service->AddRecord(xmlServiceRecord);
reply.waitForFinished();
if (reply.isError()) {
- qWarning() << "AddRecord returned error" << reply.error();
+ qCWarning(QT_BT_BLUEZ) << "AddRecord returned error" << reply.error();
return false;
}
@@ -278,7 +279,7 @@ bool QBluetoothServiceInfoPrivate::registerService(const QBluetoothAddress &loca
QDBusPendingReply<> reply = service->UpdateRecord(serviceRecord, xmlServiceRecord);
reply.waitForFinished();
if (reply.isError()) {
- qWarning() << "UpdateRecord returned error" << reply.error();
+ qCWarning(QT_BT_BLUEZ) << "UpdateRecord returned error" << reply.error();
return false;
}
}