aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppHttpUploadManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/QXmppHttpUploadManager.cpp')
-rw-r--r--src/client/QXmppHttpUploadManager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/QXmppHttpUploadManager.cpp b/src/client/QXmppHttpUploadManager.cpp
index 7feac738..46242d5f 100644
--- a/src/client/QXmppHttpUploadManager.cpp
+++ b/src/client/QXmppHttpUploadManager.cpp
@@ -299,7 +299,11 @@ std::shared_ptr<QXmppHttpUpload> QXmppHttpUploadManager::uploadFile(std::unique_
}
auto future = client()->findExtension<QXmppUploadRequestManager>()->requestSlot(filename, fileSize, mimeType, uploadServiceJid);
+#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
await(future, this, [this, upload, data = std::move(data)](SlotResult result) mutable {
+#else
+ await(future, this, [this, upload, rawSourceDevice = data.release()](SlotResult result) mutable {
+#endif
// first check whether upload was cancelled in the meantime
if (upload->d->cancelled) {
upload->d->reportFinished();
@@ -327,7 +331,11 @@ std::shared_ptr<QXmppHttpUpload> QXmppHttpUploadManager::uploadFile(std::unique_
request.setRawHeader(itr.key().toUtf8(), itr.value().toUtf8());
}
+#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
auto *rawSourceDevice = data.release();
+#else
+ // already defined in lambda capture
+#endif
auto *reply = d->netManager->put(request, rawSourceDevice);
rawSourceDevice->setParent(reply);
upload->d->reply = reply;