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.
This commit is contained in:
Petr Mrázek 2013-08-09 00:26:35 +02:00
parent c8925e0f66
commit bf5f5091ef
16 changed files with 122 additions and 148 deletions

View file

@ -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");
}