fix: race condition on ResourceFolderModel tests

This (hopefully) fixes the race contiditions that sometimes got
triggered in tests.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-09-03 13:25:05 -03:00
parent 3b13e692d2
commit 42c81395b3
9 changed files with 46 additions and 55 deletions

View File

@ -151,7 +151,7 @@ int ModFolderModel::columnCount(const QModelIndex &parent) const
Task* ModFolderModel::createUpdateTask()
{
auto index_dir = indexDir();
auto task = new ModFolderLoadTask(dir(), index_dir, m_is_indexed, m_first_folder_load, this);
auto task = new ModFolderLoadTask(dir(), index_dir, m_is_indexed, m_first_folder_load);
m_first_folder_load = false;
return task;
}
@ -259,15 +259,6 @@ void ModFolderModel::onUpdateSucceeded()
#endif
applyUpdates(current_set, new_set, new_mods);
m_current_update_task.reset();
if (m_scheduled_update) {
m_scheduled_update = false;
update();
} else {
emit updateFinished();
}
}
void ModFolderModel::onParseSucceeded(int ticket, QString mod_id)