From 6f9be258dc87752c3d8d80cac44570575ecba7b0 Mon Sep 17 00:00:00 2001 From: iTrooz Date: Thu, 28 Nov 2024 17:49:35 +0100 Subject: [PATCH] add documentation about task abortion --- launcher/tasks/Task.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/launcher/tasks/Task.h b/launcher/tasks/Task.h index 3f4d8274e..60799498f 100644 --- a/launcher/tasks/Task.h +++ b/launcher/tasks/Task.h @@ -156,6 +156,7 @@ class Task : public QObject, public QRunnable { // used by the task caller to start the task virtual void start(); + //! used by external code to ask the task to aborta virtual bool abort() { if (canAbort()) @@ -179,6 +180,7 @@ class Task : public QObject, public QRunnable { protected slots: //! The Task subclass must call this method when the task has succeeded virtual void emitSucceeded(); + //! **The Task subclass** must call this method when the task has succeeded. External code should call abort() instead. virtual void emitAborted(); //! The Task subclass must call this method when the task has failed virtual void emitFailed(QString reason = "");