diff --git a/kuiserver/jobview.h b/kuiserver/jobview.h --- a/kuiserver/jobview.h +++ b/kuiserver/jobview.h @@ -109,6 +109,7 @@ QDBusObjectPath objectPath() const; + bool isTerminated() const; /** diff --git a/kuiserver/jobview.cpp b/kuiserver/jobview.cpp --- a/kuiserver/jobview.cpp +++ b/kuiserver/jobview.cpp @@ -53,6 +53,7 @@ void JobView::terminate(const QString &errorMessage) { + qDebug() << "is terminated" << errorMessage; QDBusConnection::sessionBus().unregisterObject(m_objectPath.path(), QDBusConnection::UnregisterTree); typedef QPair iFacePair; @@ -77,6 +78,11 @@ m_isTerminated = true; } +bool JobView::isTerminated() const +{ + return m_isTerminated; +} + void JobView::requestSuspend() { emit suspendRequested(); diff --git a/kuiserver/progresslistmodel.cpp b/kuiserver/progresslistmodel.cpp --- a/kuiserver/progresslistmodel.cpp +++ b/kuiserver/progresslistmodel.cpp @@ -325,6 +325,9 @@ if (!jobs.isEmpty()) { m_jobViewsOwners.remove(name); Q_FOREACH(JobView *job, jobs) { + if (job->isTerminated()) { + continue; + } job->setError(KIO::ERR_SLAVE_DIED); job->terminate(job->errorText()); }