summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothtransferreply_bluez.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qbluetoothtransferreply_bluez.cpp')
-rw-r--r--src/bluetooth/qbluetoothtransferreply_bluez.cpp13
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;
}