fix: better handle corner case
This commit is contained in:
parent
166f872712
commit
f8e7fb3d48
@ -34,6 +34,11 @@ void SequentialTask::executeTask()
|
||||
bool SequentialTask::abort()
|
||||
{
|
||||
if(m_currentIndex == -1 || m_currentIndex >= m_queue.size()) {
|
||||
if(m_currentIndex == -1) {
|
||||
// Don't call emitAborted() here, we want to bypass the 'is the task running' check
|
||||
emit aborted();
|
||||
emit finished();
|
||||
}
|
||||
m_queue.clear();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user