summaryrefslogtreecommitdiffstats
path: root/logic/net/PasteUpload.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-07-26 17:55:29 +0200
committerPetr Mrázek <peterix@gmail.com>2015-07-26 17:55:29 +0200
commitd8caab515aa641ec901592d40b5d30c6dfd282f5 (patch)
tree612b322374083309027204b656d4dc0a78780de8 /logic/net/PasteUpload.cpp
parent6310f6569c2630f27ad72dc0a5fef9f9fec5a88c (diff)
downloadMultiMC-d8caab515aa641ec901592d40b5d30c6dfd282f5.tar
MultiMC-d8caab515aa641ec901592d40b5d30c6dfd282f5.tar.gz
MultiMC-d8caab515aa641ec901592d40b5d30c6dfd282f5.tar.lz
MultiMC-d8caab515aa641ec901592d40b5d30c6dfd282f5.tar.xz
MultiMC-d8caab515aa641ec901592d40b5d30c6dfd282f5.zip
GH-1053 add back update progress dialog
Diffstat (limited to 'logic/net/PasteUpload.cpp')
-rw-r--r--logic/net/PasteUpload.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/logic/net/PasteUpload.cpp b/logic/net/PasteUpload.cpp
index b780194f..cfbc561d 100644
--- a/logic/net/PasteUpload.cpp
+++ b/logic/net/PasteUpload.cpp
@@ -30,10 +30,8 @@ void PasteUpload::executeTask()
m_reply = std::shared_ptr<QNetworkReply>(rep);
setStatus(tr("Uploading to paste.ee"));
- connect(rep, &QNetworkReply::downloadProgress, [&](qint64 value, qint64 max)
- { setProgress(value / qMax((qint64)1, max) * 100); });
- connect(rep, SIGNAL(error(QNetworkReply::NetworkError)), this,
- SLOT(downloadError(QNetworkReply::NetworkError)));
+ connect(rep, &QNetworkReply::downloadProgress, this, &Task::setProgress);
+ connect(rep, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError)));
connect(rep, SIGNAL(finished()), this, SLOT(downloadFinished()));
}