[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bkdelibs/KDE/4=2E6=5D_kio/kio=3A_Add_KAuthorize_hook?=
From: Alex Fiestas <afiestas () kde ! org>
Date: 2011-04-15 15:17:06
Message-ID: 20110415151706.098C0A60A9 () git ! kde ! org
[Download RAW message or body]
Git commit 1855d5963c4fdbc96456dc7ce661b5bccc795472 by Alex Fiestas.
Committed on 15/04/2011 at 17:04.
Pushed by afiestas into branch 'KDE/4.6'.
Add KAuthorize hooks into KFileItemAction openwith methods
REVIEW:101082
M +7 -1 kio/kio/kfileitemactions.cpp
http://commits.kde.org/kdelibs/1855d5963c4fdbc96456dc7ce661b5bccc795472
diff --git a/kio/kio/kfileitemactions.cpp b/kio/kio/kfileitemactions.cpp
index 7f7d5c9..3b44e0b 100644
--- a/kio/kio/kfileitemactions.cpp
+++ b/kio/kio/kfileitemactions.cpp
@@ -168,7 +168,9 @@ int KFileItemActionsPrivate::insertServices(const ServiceList& list,
void KFileItemActionsPrivate::slotExecuteService(QAction* act)
{
KServiceAction serviceAction = act->data().value<KServiceAction>();
- KDesktopFileActions::executeService(m_props.urlList(), serviceAction);
+ if (KAuthorized::authorizeKAction(serviceAction.name())) {
+ KDesktopFileActions::executeService(m_props.urlList(), serviceAction);
+ }
}
////
@@ -493,6 +495,10 @@ static KService::Ptr preferredService(const QString& mimeType, const QString& co
void KFileItemActions::addOpenWithActionsTo(QMenu* topMenu, const QString& traderConstraint)
{
+ if (!KAuthorized::authorizeKAction("openwith")) {
+ return;
+ }
+
d->m_traderConstraint = traderConstraint;
KService::List offers = associatedApplications(d->m_mimeTypeList, traderConstraint);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic