[kcm] Handle empty shortcut in property fetch
ClosedPublic

Authored by davidedmundson on Jan 19 2020, 7:01 PM.

Details

Summary

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

BUG: 416397
FIXED-IN: 5.18.0

Diff Detail

Repository
R133 KScreenLocker
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Jan 19 2020, 7:01 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 19 2020, 7:01 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Jan 19 2020, 7:01 PM
ngraham accepted this revision.Jan 19 2020, 9:44 PM
ngraham edited the summary of this revision. (Show Details)
ngraham added a subscriber: ngraham.

Good catch.

This revision is now accepted and ready to land.Jan 19 2020, 9:44 PM
This revision was automatically updated to reflect the committed changes.
apol added a subscriber: apol.Jan 19 2020, 11:38 PM

FWIW, for this you could have used QList::value(0), it would have saved quite a bit of boilerplate.
https://doc.qt.io/qt-5/qlist.html#value