Commit e8e17c5e authored by Nate Graham's avatar Nate Graham
Browse files

[ksmserver] Remove default shortcuts for "Without Confirmation" actions

These actions bypass the user setting for whether or not to show the
logout screen and always log out/reboot/etc. immediately.  Because they
have default keyboard shortcuts, they can be triggered by accident and
cause unexpected logouts/reboots/etc.

BUG: 435954
FIXED-IN: 5.22
parent 9f02b43f
......@@ -880,17 +880,17 @@ void KSMServer::setupShortcuts()
a = actionCollection->addAction(QStringLiteral("Log Out Without Confirmation"));
a->setText(i18n("Log Out Without Confirmation"));
KGlobalAccel::self()->setGlobalShortcut(a, QList<QKeySequence>() << Qt::ALT + Qt::CTRL + Qt::SHIFT + Qt::Key_Delete);
KGlobalAccel::self()->setGlobalShortcut(a, QKeySequence());
connect(a, &QAction::triggered, this, &KSMServer::logoutWithoutConfirmation);
a = actionCollection->addAction(QStringLiteral("Halt Without Confirmation"));
a->setText(i18n("Halt Without Confirmation"));
KGlobalAccel::self()->setGlobalShortcut(a, QList<QKeySequence>() << Qt::ALT + Qt::CTRL + Qt::SHIFT + Qt::Key_PageDown);
KGlobalAccel::self()->setGlobalShortcut(a, QKeySequence());
connect(a, &QAction::triggered, this, &KSMServer::haltWithoutConfirmation);
a = actionCollection->addAction(QStringLiteral("Reboot Without Confirmation"));
a->setText(i18n("Reboot Without Confirmation"));
KGlobalAccel::self()->setGlobalShortcut(a, QList<QKeySequence>() << Qt::ALT + Qt::CTRL + Qt::SHIFT + Qt::Key_PageUp);
KGlobalAccel::self()->setGlobalShortcut(a, QKeySequence());
connect(a, &QAction::triggered, this, &KSMServer::rebootWithoutConfirmation);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment