diff options
author | Andrew <forkk@forkk.net> | 2013-05-06 17:19:20 -0500 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-05-06 17:19:20 -0500 |
commit | 7e3592bee891e78c9d42dcd84bc9c1ac7a3e7688 (patch) | |
tree | 4fb1ac88b2aa5daa10b6bde4764453623c3ac4f5 /libmultimc/src | |
parent | 2fe6bc47ed5f3d52d33d164af9a2176eb7d29026 (diff) | |
download | MultiMC-7e3592bee891e78c9d42dcd84bc9c1ac7a3e7688.tar MultiMC-7e3592bee891e78c9d42dcd84bc9c1ac7a3e7688.tar.gz MultiMC-7e3592bee891e78c9d42dcd84bc9c1ac7a3e7688.tar.lz MultiMC-7e3592bee891e78c9d42dcd84bc9c1ac7a3e7688.tar.xz MultiMC-7e3592bee891e78c9d42dcd84bc9c1ac7a3e7688.zip |
Made the version list load in the background on startup.
Resolves JIRA issue MMC-11:
https://jira.forkk.net/browse/MMC-11
Diffstat (limited to 'libmultimc/src')
-rw-r--r-- | libmultimc/src/task.cpp | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/libmultimc/src/task.cpp b/libmultimc/src/task.cpp index 3e30827b..780c3b38 100644 --- a/libmultimc/src/task.cpp +++ b/libmultimc/src/task.cpp @@ -29,7 +29,7 @@ QString Task::getStatus() const void Task::setStatus(const QString &status) { this->status = status; - emit statusChanged(status); + emitStatusChange(status); } int Task::getProgress() const @@ -45,7 +45,7 @@ void Task::calcProgress(int parts, int whole) void Task::setProgress(int progress) { this->progress = progress; - emit progressChanged(progress); + emitProgressChange(progress); } void Task::startTask() @@ -55,7 +55,29 @@ void Task::startTask() void Task::run() { - emit taskStarted(this); + emitStarted(); executeTask(); - emit taskEnded(this); + emitEnded(); +} + +void Task::emitStarted() +{ + emit started(); + emit started(this); +} + +void Task::emitEnded() +{ + emit ended(); + emit ended(this); +} + +void Task::emitStatusChange(const QString &status) +{ + emit statusChanged(status); +} + +void Task::emitProgressChange(int progress) +{ + emit progressChanged(progress); } |