64 lines
1.9 KiB
Diff
64 lines
1.9 KiB
Diff
Index: kdeui/jobs/kuiserverjobtracker.cpp
|
|
===================================================================
|
|
--- kdeui/jobs/kuiserverjobtracker.cpp (Revision 950982)
|
|
+++ kdeui/jobs/kuiserverjobtracker.cpp (Revision 950983)
|
|
@@ -35,13 +35,32 @@
|
|
class KUiServerJobTracker::Private
|
|
{
|
|
public:
|
|
- Private() { }
|
|
+ Private(KUiServerJobTracker *parent)
|
|
+ : q(parent)
|
|
+ {
|
|
+ }
|
|
|
|
+ KUiServerJobTracker *const q;
|
|
+
|
|
+ void _k_killJob();
|
|
+
|
|
QHash<KJob*, org::kde::JobView*> progressJobView;
|
|
};
|
|
|
|
+void KUiServerJobTracker::Private::_k_killJob()
|
|
+{
|
|
+ org::kde::JobView *jobView = qobject_cast<org::kde::JobView*>(q->sender());
|
|
+
|
|
+ if (jobView) {
|
|
+ KJob *job = progressJobView.key(jobView);
|
|
+
|
|
+ if (job)
|
|
+ job->kill(KJob::EmitResult);
|
|
+ }
|
|
+}
|
|
+
|
|
KUiServerJobTracker::KUiServerJobTracker(QObject *parent)
|
|
- : KJobTrackerInterface(parent), d(new Private)
|
|
+ : KJobTrackerInterface(parent), d(new Private(this))
|
|
{
|
|
|
|
}
|
|
@@ -81,8 +100,8 @@
|
|
reply.value().path(),
|
|
QDBusConnection::sessionBus());
|
|
|
|
- QObject::connect(jobView, SIGNAL(cancelRequested()), job,
|
|
- SLOT(kill()));
|
|
+ QObject::connect(jobView, SIGNAL(cancelRequested()), this,
|
|
+ SLOT(_k_killJob()));
|
|
QObject::connect(jobView, SIGNAL(suspendRequested()), job,
|
|
SLOT(suspend()));
|
|
QObject::connect(jobView, SIGNAL(resumeRequested()), job,
|
|
Index: kdeui/jobs/kuiserverjobtracker.h
|
|
===================================================================
|
|
--- kdeui/jobs/kuiserverjobtracker.h (Revision 950982)
|
|
+++ kdeui/jobs/kuiserverjobtracker.h (Revision 950983)
|
|
@@ -78,6 +78,8 @@
|
|
private:
|
|
class Private;
|
|
Private *const d;
|
|
+
|
|
+ Q_PRIVATE_SLOT(d, void _k_killJob())
|
|
};
|
|
|
|
#endif
|