fix: abort and fail logic in tasks
Also sets up correctly the status connections
This commit is contained in:
@ -100,6 +100,7 @@ void Task::emitAborted()
|
||||
m_failReason = "Aborted.";
|
||||
qDebug() << "Task" << describe() << "aborted.";
|
||||
emit aborted();
|
||||
emit finished();
|
||||
}
|
||||
|
||||
void Task::emitSucceeded()
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user