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:
@ -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)
|
||||
|
Reference in New Issue
Block a user