Commit d5fdd114 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Fix threading issue

`CreateJob::doWork()` might be executed in another thread (if we are
using the libarchive or libzip plugin), so any QObject created there
cannot use `this` as parent (since the CreateJob had been created
in the main thread).

We don't actually need to create an Entry object here, since all the
interfaces have checks for null destination entries.

Fixes T7206
parent e43f773c
......@@ -463,7 +463,7 @@ void CreateJob::setMultiVolume(bool isMultiVolume)
void CreateJob::doWork()
m_addJob = archive()->addFiles(m_entries, new Archive::Entry(this), m_options);
m_addJob = archive()->addFiles(m_entries, nullptr, m_options);
if (m_addJob) {
connect(m_addJob, &KJob::result, this, &CreateJob::emitResult);
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