diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2013-12-16 16:02:37 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-20 09:06:10 +0100 |
commit | 94f862e2786c5e9b558ae6ab6f524842949c0953 (patch) | |
tree | 8905bcdae7592fb1ca26ea43e3330b03b62dbede /src/bluetooth/qbluetoothtransferreply_bluez.cpp | |
parent | f661b7fbb19d845b23450c57127020ee86df578d (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/qbluetoothtransferreply_bluez.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothtransferreply_bluez.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bluetooth/qbluetoothtransferreply_bluez.cpp b/src/bluetooth/qbluetoothtransferreply_bluez.cpp index 0634f080..19be6d48 100644 --- a/src/bluetooth/qbluetoothtransferreply_bluez.cpp +++ b/src/bluetooth/qbluetoothtransferreply_bluez.cpp @@ -49,6 +49,7 @@ #include "bluez/obex_transfer_p.h" #include "qbluetoothtransferreply.h" +#include <QtCore/QLoggingCategory> #include <QFuture> #include <QFutureWatcher> #include <QtConcurrentRun> @@ -57,6 +58,8 @@ static const QLatin1String agentPath("/qt/agent"); QT_BEGIN_NAMESPACE +Q_DECLARE_LOGGING_CATEGORY(QT_BT_BLUEZ) + QBluetoothTransferReplyBluez::QBluetoothTransferReplyBluez(QIODevice *input, const QBluetoothTransferRequest &request, QBluetoothTransferManager *parent) : QBluetoothTransferReply(parent), tempfile(0), source(input), @@ -76,7 +79,7 @@ QBluetoothTransferReplyBluez::QBluetoothTransferReplyBluez(QIODevice *input, con bool res = QDBusConnection::sessionBus().registerObject(m_agent_path, this); if(!res) - qWarning() << "Failed Creating dbus objects"; + qCWarning(QT_BT_BLUEZ) << "Failed Creating dbus objects"; qRegisterMetaType<QBluetoothTransferReply*>("QBluetoothTransferReply*"); QMetaObject::invokeMethod(this, "start", Qt::QueuedConnection); @@ -100,7 +103,7 @@ bool QBluetoothTransferReplyBluez::start() if(!file){ tempfile = new QTemporaryFile(this ); tempfile->open(); -// qDebug() << "Not a QFile, making a copy" << tempfile->fileName(); + qCDebug(QT_BT_BLUEZ) << "Not a QFile, making a copy" << tempfile->fileName(); QFutureWatcher<bool> *watcher = new QFutureWatcher<bool>(); QObject::connect(watcher, SIGNAL(finished()), this, SLOT(copyDone())); @@ -272,7 +275,7 @@ void QBluetoothTransferReplyBluez::abort() QDBusPendingReply<> reply = xfer->Cancel(); reply.waitForFinished(); if(reply.isError()){ - qWarning() << "Failed to abort transfer" << reply.error(); + qCWarning(QT_BT_BLUEZ) << "Failed to abort transfer" << reply.error(); } delete xfer; } |