diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-05-02 23:42:33 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-05-02 23:42:33 +0200 |
commit | 5779ffd6645ba3fae5abe068d456fc1ee9dd91ff (patch) | |
tree | be5d81b6132b63db368e7061d766f70250fa222c /logic | |
parent | 4fc4a172562a76091721b8c488aafbd6ed2b01ed (diff) | |
download | MultiMC-5779ffd6645ba3fae5abe068d456fc1ee9dd91ff.tar MultiMC-5779ffd6645ba3fae5abe068d456fc1ee9dd91ff.tar.gz MultiMC-5779ffd6645ba3fae5abe068d456fc1ee9dd91ff.tar.lz MultiMC-5779ffd6645ba3fae5abe068d456fc1ee9dd91ff.tar.xz MultiMC-5779ffd6645ba3fae5abe068d456fc1ee9dd91ff.zip |
GH-922 improve version select dialogs
Diffstat (limited to 'logic')
-rw-r--r-- | logic/forge/ForgeVersionList.cpp | 5 | ||||
-rw-r--r-- | logic/forge/ForgeVersionList.h | 1 | ||||
-rw-r--r-- | logic/tasks/Task.cpp | 2 | ||||
-rw-r--r-- | logic/tasks/Task.h | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/logic/forge/ForgeVersionList.cpp b/logic/forge/ForgeVersionList.cpp index b2320a6d..4f9870f7 100644 --- a/logic/forge/ForgeVersionList.cpp +++ b/logic/forge/ForgeVersionList.cpp @@ -144,6 +144,11 @@ void ForgeListLoadTask::executeTask() listJob->start(); } +void ForgeListLoadTask::abort() +{ + listJob->abort(); +} + bool ForgeListLoadTask::parseForgeList(QList<BaseVersionPtr> &out) { QByteArray data; diff --git a/logic/forge/ForgeVersionList.h b/logic/forge/ForgeVersionList.h index baae570d..2ffc2d68 100644 --- a/logic/forge/ForgeVersionList.h +++ b/logic/forge/ForgeVersionList.h @@ -66,6 +66,7 @@ public: explicit ForgeListLoadTask(ForgeVersionList *vlist); virtual void executeTask(); + virtual void abort(); protected slots: diff --git a/logic/tasks/Task.cpp b/logic/tasks/Task.cpp index 150ea48d..8fed810b 100644 --- a/logic/tasks/Task.cpp +++ b/logic/tasks/Task.cpp @@ -44,6 +44,7 @@ void Task::emitFailed(QString reason) m_failReason = reason; qCritical() << "Task failed: " << reason; emit failed(reason); + emit finished(); } void Task::emitSucceeded() @@ -53,6 +54,7 @@ void Task::emitSucceeded() m_succeeded = true; qDebug() << "Task succeeded"; emit succeeded(); + emit finished(); } bool Task::isRunning() const diff --git a/logic/tasks/Task.h b/logic/tasks/Task.h index 746a2b26..3ab85d7d 100644 --- a/logic/tasks/Task.h +++ b/logic/tasks/Task.h @@ -42,6 +42,7 @@ public: signals: void started(); void progress(qint64 current, qint64 total); + void finished(); void succeeded(); void failed(QString reason); void status(QString status); |