Commit db311474 authored by David Edmundson's avatar David Edmundson
Browse files

Fix use of assert/crash when removing global shortcut

I'm not the author, but it's pretty clear what the intention was.

We expect to get one result back from proxyModel->match
We use results.first(), so we want to check we have at least one entry.
The assert was written backwards

BUG: 387444

Test Plan: Can now remove a group without a crash

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: graesslin, plasma-devel

Tags: #plasma

Differential Revision:
parent 8af970fd
......@@ -832,7 +832,7 @@ void KGlobalShortcutsEditor::KGlobalShortcutsEditorPrivate::removeComponent(
// Remove from QComboBox
QModelIndexList results = proxyModel->match(proxyModel->index(0, 0), Qt::DisplayRole, text);
// Remove from QStackedWidget
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