diff options
author | markd <markd@pkgsrc.org> | 2014-07-24 21:30:10 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2014-07-24 21:30:10 +0000 |
commit | 8ac8f5d6cbc9c42e882160e155e671949cb03ad8 (patch) | |
tree | 7969eca5c37d9b7ead291a44f3a3d8b2d7c4e986 /x11/kdelibs4/patches/patch-kio_kio_usernotificationhandler.cpp | |
parent | 690da9cf33f00241b177a1b85e77074d3e195ab0 (diff) | |
download | pkgsrc-8ac8f5d6cbc9c42e882160e155e671949cb03ad8.tar.gz |
Fix for http://www.kde.org/info/security/advisory-20140618-1.txt
Bump PKGREVISION.
Diffstat (limited to 'x11/kdelibs4/patches/patch-kio_kio_usernotificationhandler.cpp')
-rw-r--r-- | x11/kdelibs4/patches/patch-kio_kio_usernotificationhandler.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/x11/kdelibs4/patches/patch-kio_kio_usernotificationhandler.cpp b/x11/kdelibs4/patches/patch-kio_kio_usernotificationhandler.cpp new file mode 100644 index 00000000000..3b4f1daafed --- /dev/null +++ b/x11/kdelibs4/patches/patch-kio_kio_usernotificationhandler.cpp @@ -0,0 +1,48 @@ +$NetBSD: patch-kio_kio_usernotificationhandler.cpp,v 1.1 2014/07/24 21:30:10 markd Exp $ + +http://quickgit.kde.org/?p=kdelibs.git&a=commitdiff&h=bbae87dc1be3ae063796a582774bd5642cacdd5d +Don't require a job to handle messageboxes. +http://www.kde.org/info/security/advisory-20140618-1.txt + +--- kio/kio/usernotificationhandler.cpp.orig 2014-01-02 19:26:52.000000000 +0000 ++++ kio/kio/usernotificationhandler.cpp +@@ -20,6 +20,7 @@ + + #include "slave.h" + #include "job_p.h" ++#include "jobuidelegate.h" + + #include <kdebug.h> + +@@ -76,19 +77,18 @@ void UserNotificationHandler::processReq + + if (m_cachedResults.contains(key)) { + result = *(m_cachedResults[key]); +- } else if (r->slave->job()) { +- SimpleJobPrivate* jobPrivate = SimpleJobPrivate::get(r->slave->job()); +- if (jobPrivate) { +- result = jobPrivate->requestMessageBox(r->type, +- r->data.value(MSG_TEXT).toString(), +- r->data.value(MSG_CAPTION).toString(), +- r->data.value(MSG_YES_BUTTON_TEXT).toString(), +- r->data.value(MSG_NO_BUTTON_TEXT).toString(), +- r->data.value(MSG_YES_BUTTON_ICON).toString(), +- r->data.value(MSG_NO_BUTTON_ICON).toString(), +- r->data.value(MSG_DONT_ASK_AGAIN).toString(), +- r->data.value(MSG_META_DATA).toMap()); +- } ++ } else { ++ JobUiDelegate ui; ++ const JobUiDelegate::MessageBoxType type = static_cast<JobUiDelegate::MessageBoxType>(r->type); ++ result = ui.requestMessageBox(type, ++ r->data.value(MSG_TEXT).toString(), ++ r->data.value(MSG_CAPTION).toString(), ++ r->data.value(MSG_YES_BUTTON_TEXT).toString(), ++ r->data.value(MSG_NO_BUTTON_TEXT).toString(), ++ r->data.value(MSG_YES_BUTTON_ICON).toString(), ++ r->data.value(MSG_NO_BUTTON_ICON).toString(), ++ r->data.value(MSG_DONT_ASK_AGAIN).toString(), ++ r->data.value(MSG_META_DATA).toMap()); + m_cachedResults.insert(key, new int(result)); + } + } else { |