summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <elvis.angelaccio@kde.org>2016-11-26 16:47:04 (GMT)
committerElvis Angelaccio <elvis.angelaccio@kde.org>2016-11-26 16:47:04 (GMT)
commit32439e4d7a751063fa5f345b42df47f0d3210571 (patch)
tree56106f0d13c7e2ca05fb7fa4d4b36b8478049773
parentdecfd47d0334b8419764b95122306440a646d320 (diff)
Fix percentage progress in batch extractions
The new BatchExtractJob needs to forward the progress() signal (emitted when the underlying ExtractJob runs) to its own onProgress() slot. This works because the archiveInterface() instance is the same for both jobs.
-rw-r--r--kerfuffle/jobs.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/kerfuffle/jobs.cpp b/kerfuffle/jobs.cpp
index 4786863..a85c7ef 100644
--- a/kerfuffle/jobs.cpp
+++ b/kerfuffle/jobs.cpp
@@ -356,6 +356,8 @@ BatchExtractJob::BatchExtractJob(LoadJob *loadJob, const QString &destination, b
void BatchExtractJob::doWork()
{
connect(m_loadJob, &KJob::result, this, &BatchExtractJob::slotLoadingFinished);
+ // progress() will be actually emitted by the ExtractJob, but the archiveInterface() is the same.
+ connect(archiveInterface(), &ReadOnlyArchiveInterface::progress, this, &BatchExtractJob::onProgress);
// Forward LoadJob's signals.
connect(m_loadJob, &Kerfuffle::Job::newEntry, this, &BatchExtractJob::newEntry);