summaryrefslogtreecommitdiffstats
path: root/backend/OneSixUpdate.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-08-09 00:26:35 +0200
committerPetr Mrázek <peterix@gmail.com>2013-08-09 00:26:35 +0200
commitbf5f5091ef6daeaf7067f4fc8973eb068ddc52fc (patch)
tree647f77c1d7f8c8e0e7bdf90fb7f3b0eac9aa5f6c /backend/OneSixUpdate.cpp
parentc8925e0f667b0c94028345586d99008066358200 (diff)
downloadMultiMC-bf5f5091ef6daeaf7067f4fc8973eb068ddc52fc.tar
MultiMC-bf5f5091ef6daeaf7067f4fc8973eb068ddc52fc.tar.gz
MultiMC-bf5f5091ef6daeaf7067f4fc8973eb068ddc52fc.tar.lz
MultiMC-bf5f5091ef6daeaf7067f4fc8973eb068ddc52fc.tar.xz
MultiMC-bf5f5091ef6daeaf7067f4fc8973eb068ddc52fc.zip
Various task related improvements.
* Errors are reported back to task users via Failure signals. * Lwjgl doesn't download on each legacy instance start anymore. * Tasks were unified when it comes to success/failure. * Task dialogs don't get spawned after short tasks finish anymore.
Diffstat (limited to 'backend/OneSixUpdate.cpp')
-rw-r--r--backend/OneSixUpdate.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/backend/OneSixUpdate.cpp b/backend/OneSixUpdate.cpp
index 84d8dfae..db15c923 100644
--- a/backend/OneSixUpdate.cpp
+++ b/backend/OneSixUpdate.cpp
@@ -43,7 +43,7 @@ void OneSixUpdate::executeTask()
if(targetVersion == nullptr)
{
// don't do anything if it was invalid
- emit gameUpdateComplete();
+ emitSucceeded();
return;
}
@@ -104,8 +104,7 @@ void OneSixUpdate::versionFileFinished()
void OneSixUpdate::versionFileFailed()
{
- error("Failed to download the version description. Try again.");
- emitEnded();
+ emitFailed("Failed to download the version description. Try again.");
}
void OneSixUpdate::jarlibStart()
@@ -114,8 +113,7 @@ void OneSixUpdate::jarlibStart()
bool successful = inst->reloadFullVersion();
if(!successful)
{
- error("Failed to load the version description file (version.json). It might be corrupted, missing or simply too new.");
- emitEnded();
+ emitFailed("Failed to load the version description file (version.json). It might be corrupted, missing or simply too new.");
return;
}
@@ -149,13 +147,11 @@ void OneSixUpdate::jarlibStart()
void OneSixUpdate::jarlibFinished()
{
- emit gameUpdateComplete();
- emitEnded();
+ emitSucceeded();
}
void OneSixUpdate::jarlibFailed()
{
- error("Failed to download the binary garbage. Try again. Maybe. IF YOU DARE");
- emitEnded();
+ emitFailed("Failed to download the binary garbage. Try again. Maybe. IF YOU DARE");
}