diff options
author | flow <thiagodonato300@gmail.com> | 2022-05-01 11:05:31 -0300 |
---|---|---|
committer | flow <thiagodonato300@gmail.com> | 2022-05-12 18:11:55 -0300 |
commit | 57d65177c8ebb5463c88dd8e26f1e0a33f648bed (patch) | |
tree | 9dce3e052a5aca871e353946355b113ae8ca2ef6 /launcher/tasks | |
parent | 040ee919e5ea71364daa08c30e09c843976f5734 (diff) | |
download | PrismLauncher-57d65177c8ebb5463c88dd8e26f1e0a33f648bed.tar.gz PrismLauncher-57d65177c8ebb5463c88dd8e26f1e0a33f648bed.tar.bz2 PrismLauncher-57d65177c8ebb5463c88dd8e26f1e0a33f648bed.zip |
fix: abort and fail logic in tasks
Also sets up correctly the status connections
Diffstat (limited to 'launcher/tasks')
-rw-r--r-- | launcher/tasks/Task.cpp | 1 | ||||
-rw-r--r-- | launcher/tasks/Task.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/launcher/tasks/Task.cpp b/launcher/tasks/Task.cpp index 68e0e8a7..d2d62c9e 100644 --- a/launcher/tasks/Task.cpp +++ b/launcher/tasks/Task.cpp @@ -100,6 +100,7 @@ void Task::emitAborted() m_failReason = "Aborted."; qDebug() << "Task" << describe() << "aborted."; emit aborted(); + emit finished(); } void Task::emitSucceeded() diff --git a/launcher/tasks/Task.h b/launcher/tasks/Task.h index e09c57ae..0ca37e02 100644 --- a/launcher/tasks/Task.h +++ b/launcher/tasks/Task.h @@ -79,7 +79,7 @@ class Task : public QObject { public slots: virtual void start(); - virtual bool abort() { return false; }; + virtual bool abort() { if(canAbort()) emitAborted(); return canAbort(); }; protected: virtual void executeTask() = 0; |