diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-04-26 23:04:50 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-04-26 23:04:50 +0200 |
commit | f8650e3965582a57c3d0ccb5f234e6229051b16a (patch) | |
tree | f815fc22ae303e0ebe491a5d38b3f09c94da948d /logic/minecraft/OneSixUpdate.cpp | |
parent | 84549ed8078bdbd029aa5a89facc0412b8b5e753 (diff) | |
download | MultiMC-f8650e3965582a57c3d0ccb5f234e6229051b16a.tar MultiMC-f8650e3965582a57c3d0ccb5f234e6229051b16a.tar.gz MultiMC-f8650e3965582a57c3d0ccb5f234e6229051b16a.tar.lz MultiMC-f8650e3965582a57c3d0ccb5f234e6229051b16a.tar.xz MultiMC-f8650e3965582a57c3d0ccb5f234e6229051b16a.zip |
NOISSUE eliminate ProgressProvider
Diffstat (limited to 'logic/minecraft/OneSixUpdate.cpp')
-rw-r--r-- | logic/minecraft/OneSixUpdate.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/logic/minecraft/OneSixUpdate.cpp b/logic/minecraft/OneSixUpdate.cpp index 8a7a1f66..8db0c68f 100644 --- a/logic/minecraft/OneSixUpdate.cpp +++ b/logic/minecraft/OneSixUpdate.cpp @@ -72,7 +72,7 @@ void OneSixUpdate::executeTask() return; } connect(versionUpdateTask.get(), SIGNAL(succeeded()), SLOT(jarlibStart())); - connect(versionUpdateTask.get(), SIGNAL(failed(QString)), SLOT(versionUpdateFailed(QString))); + connect(versionUpdateTask.get(), &NetJob::failed, this, &OneSixUpdate::versionUpdateFailed); connect(versionUpdateTask.get(), SIGNAL(progress(qint64, qint64)), SIGNAL(progress(qint64, qint64))); setStatus(tr("Getting the version files from Mojang...")); @@ -100,7 +100,7 @@ void OneSixUpdate::assetIndexStart() jarlibDownloadJob.reset(job); connect(jarlibDownloadJob.get(), SIGNAL(succeeded()), SLOT(assetIndexFinished())); - connect(jarlibDownloadJob.get(), SIGNAL(failed()), SLOT(assetIndexFailed())); + connect(jarlibDownloadJob.get(), &NetJob::failed, this, &OneSixUpdate::assetIndexFailed); connect(jarlibDownloadJob.get(), SIGNAL(progress(qint64, qint64)), SIGNAL(progress(qint64, qint64))); @@ -146,7 +146,7 @@ void OneSixUpdate::assetIndexFinished() job->addNetAction(dl); jarlibDownloadJob.reset(job); connect(jarlibDownloadJob.get(), SIGNAL(succeeded()), SLOT(assetsFinished())); - connect(jarlibDownloadJob.get(), SIGNAL(failed()), SLOT(assetsFailed())); + connect(jarlibDownloadJob.get(), &NetJob::failed, this, &OneSixUpdate::assetsFailed); connect(jarlibDownloadJob.get(), SIGNAL(progress(qint64, qint64)), SIGNAL(progress(qint64, qint64))); jarlibDownloadJob->start(); @@ -155,9 +155,9 @@ void OneSixUpdate::assetIndexFinished() assetsFinished(); } -void OneSixUpdate::assetIndexFailed() +void OneSixUpdate::assetIndexFailed(QString reason) { - emitFailed(tr("Failed to download the assets index!")); + emitFailed(tr("Failed to download the assets index:\n%1").arg(reason)); } void OneSixUpdate::assetsFinished() @@ -165,9 +165,9 @@ void OneSixUpdate::assetsFinished() emitSucceeded(); } -void OneSixUpdate::assetsFailed() +void OneSixUpdate::assetsFailed(QString reason) { - emitFailed(tr("Failed to download assets!")); + emitFailed(tr("Failed to download assets:\n%1").arg(reason)); } void OneSixUpdate::jarlibStart() @@ -280,7 +280,7 @@ void OneSixUpdate::jarlibStart() } connect(jarlibDownloadJob.get(), SIGNAL(succeeded()), SLOT(jarlibFinished())); - connect(jarlibDownloadJob.get(), SIGNAL(failed()), SLOT(jarlibFailed())); + connect(jarlibDownloadJob.get(), &NetJob::failed, this, &OneSixUpdate::jarlibFailed); connect(jarlibDownloadJob.get(), SIGNAL(progress(qint64, qint64)), SIGNAL(progress(qint64, qint64))); @@ -336,12 +336,12 @@ void OneSixUpdate::jarlibFinished() } } -void OneSixUpdate::jarlibFailed() +void OneSixUpdate::jarlibFailed(QString reason) { QStringList failed = jarlibDownloadJob->getFailedFiles(); QString failed_all = failed.join("\n"); emitFailed( - tr("Failed to download the following files:\n%1\n\nPlease try again.").arg(failed_all)); + tr("Failed to download the following files:\n%1\n\nReason:%2\nPlease try again.").arg(failed_all, reason)); } void OneSixUpdate::fmllibsStart() @@ -400,7 +400,7 @@ void OneSixUpdate::fmllibsStart() } connect(dljob, SIGNAL(succeeded()), SLOT(fmllibsFinished())); - connect(dljob, SIGNAL(failed()), SLOT(fmllibsFailed())); + connect(dljob, &NetJob::failed, this, &OneSixUpdate::fmllibsFailed); connect(dljob, SIGNAL(progress(qint64, qint64)), SIGNAL(progress(qint64, qint64))); legacyDownloadJob.reset(dljob); legacyDownloadJob->start(); @@ -437,9 +437,9 @@ void OneSixUpdate::fmllibsFinished() assetIndexStart(); } -void OneSixUpdate::fmllibsFailed() +void OneSixUpdate::fmllibsFailed(QString reason) { - emitFailed("Game update failed: it was impossible to fetch the required FML libraries."); + emitFailed(tr("Game update failed: it was impossible to fetch the required FML libraries.\nReason:\n%1").arg(reason)); return; } |