aboutsummaryrefslogtreecommitdiff
path: root/api/logic/tasks/Task.h
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/tasks/Task.h')
-rw-r--r--api/logic/tasks/Task.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/api/logic/tasks/Task.h b/api/logic/tasks/Task.h
index 58dbc4ca..7ed7086c 100644
--- a/api/logic/tasks/Task.h
+++ b/api/logic/tasks/Task.h
@@ -1,4 +1,4 @@
-/* Copyright 2013-2018 MultiMC Contributors
+/* Copyright 2013-2021 MultiMC Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,16 @@ class MULTIMC_LOGIC_EXPORT Task : public QObject
{
Q_OBJECT
public:
+ enum class State
+ {
+ Inactive,
+ Running,
+ Succeeded,
+ Failed,
+ AbortedByUser
+ };
+
+public:
explicit Task(QObject *parent = 0);
virtual ~Task() {};
@@ -88,9 +98,7 @@ public slots:
void setProgress(qint64 current, qint64 total);
private:
- bool m_running = false;
- bool m_finished = false;
- bool m_succeeded = false;
+ State m_state = State::Inactive;
QStringList m_Warnings;
QString m_failReason = "";
QString m_status;