[ContextMenu Containment Action] Fix checking for KIOSK

Anyone else checks for run_command. Docs explicitly mention the fact that you have to also
disable action/run_command for the menu entry to appear but this is a bit awkward, isn't it.
Also fix logout to check for the correct place as listed in documentation and other code places.

BUG: 393329
FIXED-IN: 5.15.5

Differential Revision: https://phabricator.kde.org/D12376
wilder-5.14
Kai Uwe Broulik 8 years ago
parent 4932c6e2cb
commit cfd77db90c
  1. 4
      containmentactions/contextmenu/menu.cpp

@ -166,7 +166,7 @@ QAction *ContextMenu::action(const QString &name)
return c->corona()->actions()->action(QStringLiteral("add panel"));
}
} else if (name == QLatin1String("_run_command")) {
if (KAuthorized::authorizeAction(QStringLiteral("run_command"))) {
if (KAuthorized::authorizeAction(QStringLiteral("run_command")) && KAuthorized::authorize(QStringLiteral("run_command"))) {
return m_runCommandAction;
}
} else if (name == QLatin1String("_lock_screen")) {
@ -174,7 +174,7 @@ QAction *ContextMenu::action(const QString &name)
return m_lockScreenAction;
}
} else if (name == QLatin1String("_logout")) {
if (KAuthorized::authorizeAction(QStringLiteral("logout"))) {
if (KAuthorized::authorize(QStringLiteral("logout"))) {
return m_logoutAction;
}
} else if (name == QLatin1String("lock widgets")) {

Loading…
Cancel
Save