Commit 5140150e authored by David Edmundson's avatar David Edmundson
Browse files

[kcm] Handle empty shortcut in property fetch

.first() wasn't guarded with a check of
the list size.

BUG: 416397
FIXED-IN: 5.18.0

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision:
parent 48bc3b7c
......@@ -89,7 +89,11 @@ void KScreenSaverSettings::setWallpaperPluginIndex(int index)
QKeySequence KScreenSaverSettings::shortcut() const
return KGlobalAccel::self()->shortcut(m_lockAction).first();
const QList<QKeySequence> shortcuts = KGlobalAccel::self()->shortcut(m_lockAction);
if (shortcuts.count() > 0) {
return shortcuts.first();
return QKeySequence();
void KScreenSaverSettings::setShortcut(const QKeySequence &sequence)
Markdown is supported
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