fix: don't mutate QHash while iterating over it
Even though it was using a QMutableHashIterator, sometimes it didn't work quite well, so this is a bit better. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
f4b207220c
commit
7b27f200b1
@ -119,11 +119,9 @@ void EnsureMetadataTask::executeTask()
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto invalidade_leftover = [this] {
|
auto invalidade_leftover = [this] {
|
||||||
QMutableHashIterator<QString, Mod*> mods_iter(m_mods);
|
for (auto mod = m_mods.constBegin(); mod != m_mods.constEnd(); mod++)
|
||||||
while (mods_iter.hasNext()) {
|
emitFail(mod.value(), mod.key(), RemoveFromList::No);
|
||||||
auto mod = mods_iter.next();
|
m_mods.clear();
|
||||||
emitFail(mod.value(), mod.key());
|
|
||||||
}
|
|
||||||
|
|
||||||
emitSucceeded();
|
emitSucceeded();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user