backport of r1081144:
make "run associated application" obey security svn path=/branches/KDE/4.4/kdelibs/; revision=1081145
This commit is contained in:
parent
0fa82befaf
commit
f77cf8c3e0
@ -1970,6 +1970,7 @@ void Applet::setAssociatedApplication(const QString &string)
|
||||
QAction *runAssociatedApplication = d->actions->action("run associated application");
|
||||
if (runAssociatedApplication) {
|
||||
bool valid = AssociatedApplicationManager::self()->appletHasValidAssociatedApplication(this);
|
||||
valid = valid && hasAuthorization("LaunchApp"); //obey security!
|
||||
runAssociatedApplication->setVisible(valid);
|
||||
runAssociatedApplication->setEnabled(valid);
|
||||
}
|
||||
@ -1982,6 +1983,7 @@ void Applet::setAssociatedApplicationUrls(const KUrl::List &urls)
|
||||
QAction *runAssociatedApplication = d->actions->action("run associated application");
|
||||
if (runAssociatedApplication) {
|
||||
bool valid = AssociatedApplicationManager::self()->appletHasValidAssociatedApplication(this);
|
||||
valid = valid && hasAuthorization("LaunchApp"); //obey security!
|
||||
runAssociatedApplication->setVisible(valid);
|
||||
runAssociatedApplication->setEnabled(valid);
|
||||
}
|
||||
@ -1999,8 +2001,10 @@ KUrl::List Applet::associatedApplicationUrls() const
|
||||
|
||||
void Applet::runAssociatedApplication()
|
||||
{
|
||||
if (hasAuthorization("LaunchApp")) {
|
||||
AssociatedApplicationManager::self()->run(this);
|
||||
}
|
||||
}
|
||||
|
||||
bool Applet::hasValidAssociatedApplication() const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user