diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-02-17 10:38:48 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-02-17 10:38:48 +0100 |
commit | 8fe7fbe6b552b0d196967cfea85fede5e7c211b9 (patch) | |
tree | b90f246cc3b8847cedaf6b5f8dc045cfc563b9be /src/bluetooth/qbluetoothtransferreply_bluez.cpp | |
parent | 9bcb79f0c741f7805dad17c467a5c2041227a18a (diff) | |
parent | b4bde05d8459cc57c25bac3f7be19fcf03908606 (diff) | |
download | qtconnectivity-8fe7fbe6b552b0d196967cfea85fede5e7c211b9.tar.gz |
Merge branch 'dev' into btle
Conflicts:
examples/bluetooth/bluetooth.pro
src/bluetooth/doc/src/examples.qdoc
src/bluetooth/qbluetoothdevicediscoveryagent_qnx.cpp
src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
src/bluetooth/qbluetoothservicediscoveryagent_p.h
src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp
Change-Id: Ie1577e4b0f469cd5a6b05a61cbe94f180a64448d
Diffstat (limited to 'src/bluetooth/qbluetoothtransferreply_bluez.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothtransferreply_bluez.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothtransferreply_bluez.cpp b/src/bluetooth/qbluetoothtransferreply_bluez.cpp index 0634f080..8b271789 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())); @@ -110,7 +113,7 @@ bool QBluetoothTransferReplyBluez::start() } else { if (!file->exists()) { - m_errorStr = QBluetoothTransferReply::tr("File does not exist"); + m_errorStr = QBluetoothTransferReply::tr("Source file does not exist"); m_error = QBluetoothTransferReply::FileNotFoundError; m_finished = true; m_running = false; @@ -125,7 +128,7 @@ bool QBluetoothTransferReplyBluez::start() QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection, Q_ARG(QBluetoothTransferReply*, this)); return false; } - m_size = file->size(); + m_size = file->size(); startOPP(file->fileName()); } return true; @@ -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; } |