]> git.lyx.org Git - lyx.git/commitdiff
Const
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 10 Oct 2020 21:12:43 +0000 (17:12 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 10 Oct 2020 21:12:50 +0000 (17:12 -0400)
src/frontends/qt/GuiPrefs.cpp

index 01d7d9bf9dc403c81e1bfb2cd631126d1abaaf89..093efe0e559e3124b47a9a174696ed63e6264b6d 100644 (file)
@@ -3147,7 +3147,7 @@ void PrefShortcuts::removeShortcut()
        for (auto & item : items) {
                string shortcut = fromqstr(item->data(1, Qt::UserRole).toString());
                string lfun = fromqstr(item->text(0));
-               FuncRequest func = lyxaction.lookupFunc(lfun);
+               FuncRequest const func = lyxaction.lookupFunc(lfun);
 
                switch (itemType(*item)) {
                case KeyMap::System: {
@@ -3203,7 +3203,7 @@ void PrefShortcuts::deactivateShortcuts(QList<QTreeWidgetItem*> const & items)
        for (auto item : items) {
                string shortcut = fromqstr(item->data(1, Qt::UserRole).toString());
                string lfun = fromqstr(item->text(0));
-               FuncRequest func = lyxaction.lookupFunc(lfun);
+               FuncRequest const func = lyxaction.lookupFunc(lfun);
 
                switch (itemType(*item)) {
                case KeyMap::System:
@@ -3376,7 +3376,7 @@ bool PrefShortcuts::validateNewShortcut(FuncRequest const & func,
 void PrefShortcuts::shortcutOkPressed()
 {
        QString const new_lfun = shortcut_->lfunLE->text();
-       FuncRequest func = lyxaction.lookupFunc(fromqstr(new_lfun));
+       FuncRequest const func = lyxaction.lookupFunc(fromqstr(new_lfun));
        KeySequence k = shortcut_->shortcutWG->getKeySequence();
 
        // save_lfun_ contains the text of the lfun to modify, if the user clicked