Commit 97bb6421 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

CreateJob: connect to progress() signal instead of KJob::percent()

Another attempt at fixing #402824 after ce2f7f66.

This should fix progress reporting also for libzip and libarchive plugins.
The problem with those plugin is that CreateJob starts two nested threads.

BUG: 402824
FIXED-IN: 19.04.3

Reviewers: rthomsen

Subscribers: kde-utils-devel, #ark

Tags: #ark

Differential Revision:
parent 3f27deca
......@@ -473,6 +473,8 @@ void CreateJob::setMultiVolume(bool isMultiVolume)
void CreateJob::doWork()
connect(archiveInterface(), &ReadOnlyArchiveInterface::progress, this, &CreateJob::onProgress);
m_addJob = archive()->addFiles(m_entries, nullptr, m_options);
if (m_addJob) {
......@@ -481,9 +483,6 @@ void CreateJob::doWork()
connect(m_addJob, &KJob::description, this, [=](KJob *, const QString &title, const QPair<QString,QString> &field1, const QPair<QString,QString> &) {
emit description(this, title, field1);
connect(m_addJob, QOverload<KJob*,unsigned long>::of(&KJob::percent), this, [=](KJob*, unsigned long percent) {
emitPercent(percent, 100);
} else {
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