small fix

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-10-22 17:48:19 +03:00
parent a748f49362
commit 0ca3873f1c
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ void ConcurrentTask::addTask(Task::Ptr task)
void ConcurrentTask::executeTask()
{
for (auto i = 0; i < m_total_max_size; i++)
executeNextSubTask();
QMetaObject::invokeMethod(this, &ConcurrentTask::executeNextSubTask, Qt::QueuedConnection);
}
bool ConcurrentTask::abort()
@ -127,7 +127,7 @@ void ConcurrentTask::executeNextSubTask()
}
return;
}
if (m_doing.count() > m_total_max_size) {
if (m_doing.count() >= m_total_max_size) {
return;
}

View File

@ -43,7 +43,7 @@ SequentialTask::SequentialTask(QObject* parent, QString task_name) : ConcurrentT
void SequentialTask::subTaskFailed(Task::Ptr task, const QString& msg)
{
emitFailed(msg);
qWarning() << m_failed.constBegin()->get()->failReason();
qWarning() << msg;
ConcurrentTask::subTaskFailed(task, msg);
}