upstream patch fix ReadOnlyPart crash for non-local file

This commit is contained in:
Than Ngo 2009-04-08 15:08:10 +00:00
parent aff09393d1
commit bcd1eb69b6
2 changed files with 69 additions and 1 deletions

63
kdelibs-4.2.2-kjob.patch Normal file
View File

@ -0,0 +1,63 @@
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

View File

@ -1,6 +1,6 @@
Summary: K Desktop Environment 4 - Libraries
Version: 4.2.2
Release: 3%{?dist}
Release: 4%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
@ -88,6 +88,7 @@ Patch26: kdelibs-4.2.2-plasma-focus.patch
# upstream
# 4.2 branch
Patch100: kdelibs-4.2.2-kio_http.patch
Patch101: kdelibs-4.2.2-kjob.patch
# 4.3 branch
Patch200: kdelibs-4.1.96-AllowExternalPaths.patch
@ -229,6 +230,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
# upstream patches
# 4.2
%patch100 -p0 -b .kio_http
%patch101 -p0 -b .kjob
# 4.3
%patch200 -p1 -b .AllowExternalPaths
@ -413,6 +415,9 @@ rm -rf %{buildroot}
%changelog
* Wed Apr 08 2009 Than Ngo <than@redhat.com> - 4.2.2-4
- upstream patch fix ReadOnlyPart crash for non-local file
* Tue Apr 07 2009 Than Ngo <than@redhat.com> - 4.2.2-3
- fix kickoff focus issue