fix: start at least one task in ConcurrentTask
This allows us to emit all the necessary stuff when we're finished in the case of starting a task with no subtasks. In particular, this caused the mod updater to not work properly :) Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
f65d506f26
commit
7cf2c3be0f
@ -37,7 +37,8 @@ void ConcurrentTask::executeTask()
|
||||
{
|
||||
m_total_size = m_queue.size();
|
||||
|
||||
int num_starts = std::min(m_total_max_size, m_total_size);
|
||||
// Start the least amount of tasks needed, but at least one
|
||||
int num_starts = std::max(1, std::min(m_total_max_size, m_total_size));
|
||||
for (int i = 0; i < num_starts; i++) {
|
||||
QMetaObject::invokeMethod(this, &ConcurrentTask::startNext, Qt::QueuedConnection);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user