From bfc9e1e5d598f354dd39e5c2eb51d5e51585359b Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 28 Nov 2013 20:45:52 -0600 Subject: Verify access tokens before launching Minecraft Kind of an important thing to do... Heh... --- logic/tasks/Task.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'logic/tasks/Task.h') diff --git a/logic/tasks/Task.h b/logic/tasks/Task.h index 980b2af8..d08ef560 100644 --- a/logic/tasks/Task.h +++ b/logic/tasks/Task.h @@ -29,6 +29,18 @@ public: virtual void getProgress(qint64 ¤t, qint64 &total); virtual bool isRunning() const; + /*! + * True if this task was successful. + * If the task failed or is still running, returns false. + */ + virtual bool successful() const; + + /*! + * Returns the string that was passed to emitFailed as the error message when the task failed. + * If the task hasn't failed, returns an empty string. + */ + virtual QString failReason() const; + public slots: virtual void start(); @@ -48,4 +60,6 @@ protected: QString m_status; int m_progress = 0; bool m_running = false; + bool m_succeeded = false; + QString m_failReason = ""; }; -- cgit v1.2.3