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

Properly unregister BatchExtract jobs

This fixes a warning when rejecting the extraction dialog open by 'ark
--batch --dialog'
parent 4c77272c
......@@ -49,7 +49,8 @@ BatchExtract::BatchExtract(QObject* parent)
: KCompositeJob(parent),
m_autoSubfolder(false),
m_preservePaths(true),
m_openDestinationAfterExtraction(false)
m_openDestinationAfterExtraction(false),
m_registered(false)
{
setCapabilities(KJob::Killable);
......@@ -58,7 +59,7 @@ BatchExtract::BatchExtract(QObject* parent)
BatchExtract::~BatchExtract()
{
if (!m_inputs.isEmpty()) {
if (m_registered) {
KIO::getJobTracker()->unregisterJob(this);
}
}
......@@ -139,6 +140,7 @@ void BatchExtract::slotStartJob()
}
KIO::getJobTracker()->registerJob(this);
m_registered = true;
emit description(this,
i18n("Extracting Files"),
......
......@@ -225,6 +225,7 @@ private:
QStringList m_failedFiles;
bool m_preservePaths;
bool m_openDestinationAfterExtraction;
bool m_registered;
};
#endif // BATCHEXTRACT_H
Supports Markdown
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