Commit fdb150a3 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Remove finished jobs from idsByJob map

This allows us to check whether there are still jobs running for a
certain id (because there are now always two jobs for each file).

GnuPG-bug-id: 5638
parent 09c1100d
......@@ -417,10 +417,12 @@ void ImportCertificatesCommand::Private::setWaitForMoreJobs(bool wait)
void ImportCertificatesCommand::Private::importResult(const ImportResult &result)
{
const auto job = q->sender();
jobs.erase(std::remove(jobs.begin(), jobs.end(), job), jobs.end());
jobs.erase(std::remove(jobs.begin(), jobs.end(), q->sender()), jobs.end());
importResult(result, idsByJob[q->sender()]);
const auto nodeHandler = idsByJob.extract(job);
const auto id = nodeHandler.mapped();
importResult(result, id);
}
void ImportCertificatesCommand::Private::importResult(const ImportResult &result, const QString &id)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment