summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2017-10-15 23:58:57 +0200
committerElvis Angelaccio <[email protected]>2017-10-16 20:10:42 +0200
commit5ee79a80bc012dd3547f3d03bc2228aeeec98496 (patch)
tree0cf3bce377171dc767ace2989848926a8bea58f2
parent73f0aacd79d070d82889163908fd3132b38d9d13 (diff)
Use KIO jobtracker from Part
It is confusing to have a jobtracker call another jobtracker. They are both implementing the same interface in different ways, so don't mix them but rather use both from `Part::registerJob()`. Differential Revision: D8323
-rw-r--r--part/jobtracker.cpp5
-rw-r--r--part/part.cpp2
2 files changed, 2 insertions, 5 deletions
diff --git a/part/jobtracker.cpp b/part/jobtracker.cpp
index e47b4f1..c2688c0 100644
--- a/part/jobtracker.cpp
+++ b/part/jobtracker.cpp
@@ -23,10 +23,6 @@
#include "jobtracker.h"
#include "ark_debug.h"
-#include <KIO/JobTracker>
-
-#include <QDebug>
-
JobTrackerWidget::JobTrackerWidget(QWidget *parent)
: QFrame(parent)
{
@@ -75,7 +71,6 @@ void JobTracker::registerJob(KJob *job)
{
m_jobs << job;
KJobTrackerInterface::registerJob(job);
- KIO::getJobTracker()->registerJob(job);
m_ui->show();
m_ui->informationLabel->hide();
m_ui->progressBar->show();
diff --git a/part/part.cpp b/part/part.cpp
index 1d8a84d..ca5c255 100644
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -261,6 +261,8 @@ void Part::registerJob(KJob* job)
m_statusBarExtension->addStatusBarItem(m_jobTracker->widget(nullptr), 0, true);
m_jobTracker->widget(job)->show();
}
+
+ KIO::getJobTracker()->registerJob(job);
m_jobTracker->registerJob(job);
emit busy();