summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserviceinfo_bluez.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-12-16 16:02:37 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-20 09:06:10 +0100
commit94f862e2786c5e9b558ae6ab6f524842949c0953 (patch)
tree8905bcdae7592fb1ca26ea43e3330b03b62dbede /src/bluetooth/qbluetoothserviceinfo_bluez.cpp
parentf661b7fbb19d845b23450c57127020ee86df578d (diff)
Use QLoggingCategory to categorize the various debug output streams
Task-number: QTBUG-32253 Change-Id: I193162407d0fc7eca83689e31f03e1641a494ab0 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothserviceinfo_bluez.cpp')
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_bluez.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothserviceinfo_bluez.cpp b/src/bluetooth/qbluetoothserviceinfo_bluez.cpp
index d8344589..b9120c07 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,13 @@ bool QBluetoothServiceInfoPrivate::registerService(const QBluetoothAddress &loca
stream.writeEndDocument();
-// qDebug() << xmlServiceRecord;
+ qCDebug(QT_BT_BLUEZ) << 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 +281,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;
}
}