summaryrefslogtreecommitdiffstats
path: root/api/logic/screenshots
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/screenshots')
-rw-r--r--api/logic/screenshots/ImgurAlbumCreation.cpp6
-rw-r--r--api/logic/screenshots/ImgurUpload.cpp3
2 files changed, 3 insertions, 6 deletions
diff --git a/api/logic/screenshots/ImgurAlbumCreation.cpp b/api/logic/screenshots/ImgurAlbumCreation.cpp
index e009ef4d..a6964681 100644
--- a/api/logic/screenshots/ImgurAlbumCreation.cpp
+++ b/api/logic/screenshots/ImgurAlbumCreation.cpp
@@ -33,14 +33,12 @@ void ImgurAlbumCreation::start()
const QByteArray data = "ids=" + ids.join(',').toUtf8() + "&title=Minecraft%20Screenshots&privacy=hidden";
- auto worker = ENV.qnam();
- QNetworkReply *rep = worker->post(request, data);
+ QNetworkReply *rep = ENV.qnam().post(request, data);
m_reply.reset(rep);
connect(rep, &QNetworkReply::uploadProgress, this, &ImgurAlbumCreation::downloadProgress);
connect(rep, &QNetworkReply::finished, this, &ImgurAlbumCreation::downloadFinished);
- connect(rep, SIGNAL(error(QNetworkReply::NetworkError)),
- SLOT(downloadError(QNetworkReply::NetworkError)));
+ connect(rep, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(downloadError(QNetworkReply::NetworkError)));
}
void ImgurAlbumCreation::downloadError(QNetworkReply::NetworkError error)
{
diff --git a/api/logic/screenshots/ImgurUpload.cpp b/api/logic/screenshots/ImgurUpload.cpp
index 48e0ec18..ef7fee6b 100644
--- a/api/logic/screenshots/ImgurUpload.cpp
+++ b/api/logic/screenshots/ImgurUpload.cpp
@@ -49,8 +49,7 @@ void ImgurUpload::start()
namePart.setBody(m_shot->m_file.baseName().toUtf8());
multipart->append(namePart);
- auto worker = ENV.qnam();
- QNetworkReply *rep = worker->post(request, multipart);
+ QNetworkReply *rep = ENV.qnam().post(request, multipart);
m_reply.reset(rep);
connect(rep, &QNetworkReply::uploadProgress, this, &ImgurUpload::downloadProgress);