From 61f02710317b99a050346a0c95c02fcdd457bfca Mon Sep 17 00:00:00 2001 From: Jean-Marc Date: Sat, 12 Sep 2015 18:40:52 +0200 Subject: [PATCH] Add missing braces Coverity issue 23506. --- src/frontends/qt4/GuiPrefs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 54b308c48d..c53c8d7b3b 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -2869,10 +2869,11 @@ QTreeWidgetItem * PrefShortcuts::insertShortcutItem(FuncRequest const & lfun, QList const items = shortcutsTW->findItems(lfun_name, Qt::MatchFlags(Qt::MatchExactly | Qt::MatchRecursive), 0); for (int i = 0; i < items.size(); ++i) { - if (items[i]->text(1) == shortcut) + if (items[i]->text(1) == shortcut) { newItem = items[i]; break; } + } // if not found, this unbind item is KeyMap::UserExtraUnbind // Such an item is not displayed to avoid confusion (what is // unmatched removed?).