summaryrefslogtreecommitdiffstats
path: root/logic/forge
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/forge
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/forge')
-rw-r--r--logic/forge/ForgeInstaller.cpp6
-rw-r--r--logic/forge/ForgeMirrors.cpp2
-rw-r--r--logic/forge/ForgeXzDownload.cpp2
3 files changed, 4 insertions, 6 deletions
diff --git a/logic/forge/ForgeInstaller.cpp b/logic/forge/ForgeInstaller.cpp
index 32ce5788..60dce822 100644
--- a/logic/forge/ForgeInstaller.cpp
+++ b/logic/forge/ForgeInstaller.cpp
@@ -381,10 +381,8 @@ protected:
{
NetJob *fjob = new NetJob("Forge download");
fjob->addNetAction(CacheDownload::make(forgeVersion->url(), entry));
- connect(fjob, &NetJob::progress, [this](qint64 current, qint64 total)
- { setProgress(100 * current / qMax((qint64)1, total)); });
- connect(fjob, &NetJob::status, [this](const QString & msg)
- { setStatus(msg); });
+ connect(fjob, &NetJob::progress, this, &Task::setProgress);
+ connect(fjob, &NetJob::status, this, &Task::setStatus);
connect(fjob, &NetJob::failed, [this](QString reason)
{ emitFailed(tr("Failure to download Forge:\n%1").arg(reason)); });
connect(fjob, &NetJob::succeeded, installFunction);
diff --git a/logic/forge/ForgeMirrors.cpp b/logic/forge/ForgeMirrors.cpp
index 0dea0826..a2fc2c62 100644
--- a/logic/forge/ForgeMirrors.cpp
+++ b/logic/forge/ForgeMirrors.cpp
@@ -110,7 +110,7 @@ void ForgeMirrors::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
{
m_total_progress = bytesTotal;
m_progress = bytesReceived;
- emit progress(m_index_within_job, bytesReceived, bytesTotal);
+ emit netActionProgress(m_index_within_job, bytesReceived, bytesTotal);
}
void ForgeMirrors::downloadReadyRead()
diff --git a/logic/forge/ForgeXzDownload.cpp b/logic/forge/ForgeXzDownload.cpp
index 712deb33..56320ced 100644
--- a/logic/forge/ForgeXzDownload.cpp
+++ b/logic/forge/ForgeXzDownload.cpp
@@ -83,7 +83,7 @@ void ForgeXzDownload::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
{
m_total_progress = bytesTotal;
m_progress = bytesReceived;
- emit progress(m_index_within_job, bytesReceived, bytesTotal);
+ emit netActionProgress(m_index_within_job, bytesReceived, bytesTotal);
}
void ForgeXzDownload::downloadError(QNetworkReply::NetworkError error)