mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-22 01:07:15 +02:00
add documentation about task abortion
This commit is contained in:
parent
dbb88ca7df
commit
6f9be258dc
@ -156,6 +156,7 @@ class Task : public QObject, public QRunnable {
|
|||||||
|
|
||||||
// used by the task caller to start the task
|
// used by the task caller to start the task
|
||||||
virtual void start();
|
virtual void start();
|
||||||
|
//! used by external code to ask the task to aborta
|
||||||
virtual bool abort()
|
virtual bool abort()
|
||||||
{
|
{
|
||||||
if (canAbort())
|
if (canAbort())
|
||||||
@ -179,6 +180,7 @@ class Task : public QObject, public QRunnable {
|
|||||||
protected slots:
|
protected slots:
|
||||||
//! The Task subclass must call this method when the task has succeeded
|
//! The Task subclass must call this method when the task has succeeded
|
||||||
virtual void emitSucceeded();
|
virtual void emitSucceeded();
|
||||||
|
//! **The Task subclass** must call this method when the task has succeeded. External code should call abort() instead.
|
||||||
virtual void emitAborted();
|
virtual void emitAborted();
|
||||||
//! The Task subclass must call this method when the task has failed
|
//! The Task subclass must call this method when the task has failed
|
||||||
virtual void emitFailed(QString reason = "");
|
virtual void emitFailed(QString reason = "");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user