diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2013-08-05 10:07:05 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-09 14:57:14 +0200 |
commit | 40158b4277984890a55d87fca4e44d86d9a936f7 (patch) | |
tree | 2ab827035abc8976c56c912f5cff960ec4f8faa4 /src/bluetooth/qbluetoothtransferreply_bluez.cpp | |
parent | f0e7da6dab3a19a9c978f2cbba2dea60fcea619b (diff) |
Improve QBluetoothTransferManager unit test
and fix some minor issues during the process.
Task-number: QTBUG-22017
Change-Id: Iff1adde28ba818c3ed0511cb5d45404f05d7c36f
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothtransferreply_bluez.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothtransferreply_bluez.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bluetooth/qbluetoothtransferreply_bluez.cpp b/src/bluetooth/qbluetoothtransferreply_bluez.cpp index 159fdbcc..d5871b89 100644 --- a/src/bluetooth/qbluetoothtransferreply_bluez.cpp +++ b/src/bluetooth/qbluetoothtransferreply_bluez.cpp @@ -58,12 +58,13 @@ static const QLatin1String agentPath("/qt/agent"); QT_BEGIN_NAMESPACE_BLUETOOTH QBluetoothTransferReplyBluez::QBluetoothTransferReplyBluez(QIODevice *input, const QBluetoothTransferRequest &request, - QObject *parent) + QBluetoothTransferManager *parent) : QBluetoothTransferReply(parent), tempfile(0), source(input), m_running(false), m_finished(false), m_size(0), m_error(QBluetoothTransferReply::NoError), m_errorStr(), m_transfer_path() { setRequest(request); + setManager(parent); client = new OrgOpenobexClientInterface(QLatin1String("org.openobex.client"), QLatin1String("/"), QDBusConnection::sessionBus()); @@ -79,6 +80,7 @@ QBluetoothTransferReplyBluez::QBluetoothTransferReplyBluez(QIODevice *input, con qRegisterMetaType<QBluetoothTransferReply*>("QBluetoothTransferReply*"); QMetaObject::invokeMethod(this, "start", Qt::QueuedConnection); + m_running = true; } /*! @@ -92,8 +94,7 @@ QBluetoothTransferReplyBluez::~QBluetoothTransferReplyBluez() bool QBluetoothTransferReplyBluez::start() { - m_running = true; - +// qDebug() << "Got a:" << source->metaObject()->className(); QFile *file = qobject_cast<QFile *>(source); if(!file){ |