summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRagnar Thomsen <rthomsen6@gmail.com>2016-10-05 17:32:42 (GMT)
committerRagnar Thomsen <rthomsen6@gmail.com>2016-10-05 17:32:42 (GMT)
commite7a74d59eef5f4e0d2fc16c1ff9a16fc3389f5eb (patch)
tree05748f5154ec65e5cd52e8966605e15242f159db
parent43008ab1f710b561a255914a528c2464fecec7ea (diff)
Register jobs in KIO's jobtracker
This makes all of Ark's job types show up in system tray of Plasma. The progress of the jobs is then visible in system tray and they can also be stopped from system tray. Additionally, the user gets a notification when jobs complete. Ellipsis were removed from description of LoadJob ("Loading archive...") to be consistent with description of the other jobs.
-rw-r--r--kerfuffle/jobs.cpp2
-rw-r--r--part/jobtracker.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/kerfuffle/jobs.cpp b/kerfuffle/jobs.cpp
index caaed8d..4a775e0 100644
--- a/kerfuffle/jobs.cpp
+++ b/kerfuffle/jobs.cpp
@@ -248,7 +248,7 @@ LoadJob::LoadJob(ReadOnlyArchiveInterface *interface)
void LoadJob::doWork()
{
- emit description(this, i18n("Loading archive..."));
+ emit description(this, i18n("Loading archive"));
connectToArchiveInterfaceSignals();
bool ret = archiveInterface()->list();
diff --git a/part/jobtracker.cpp b/part/jobtracker.cpp
index f6d58f2..5ef54bd 100644
--- a/part/jobtracker.cpp
+++ b/part/jobtracker.cpp
@@ -23,6 +23,8 @@
#include "jobtracker.h"
#include "ark_debug.h"
+#include <KIO/JobTracker>
+
#include <QDebug>
JobTrackerWidget::JobTrackerWidget(QWidget *parent)
@@ -73,6 +75,7 @@ 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();