diff --git a/mtp/kio_mtp.cpp b/mtp/kio_mtp.cpp --- a/mtp/kio_mtp.cpp +++ b/mtp/kio_mtp.cpp @@ -398,7 +398,7 @@ } QEventLoop loop; - connect(storage, &KMTPStorageInterface::dataReady, this, [this] (const QByteArray &data) { + connect(storage, &KMTPStorageInterface::dataReady, &loop, [this] (const QByteArray &data) { MTPSlave::data(data); }); connect(storage, &KMTPStorageInterface::copyFinished, &loop, &QEventLoop::exit); @@ -861,7 +861,7 @@ int MTPSlave::waitForCopyOperation(const KMTPStorageInterface *storage) { QEventLoop loop; - connect(storage, &KMTPStorageInterface::copyProgress, this, [this] (qulonglong sent, qulonglong total) { + connect(storage, &KMTPStorageInterface::copyProgress, &loop, [this] (qulonglong sent, qulonglong total) { Q_UNUSED(total) processedSize(sent); });