From 2a273ce4c11b1a45fc2e35f99c03130b06a81535 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 31 Dec 2012 10:18:05 +0100 Subject: [PATCH] Remove redundant 'Caption' string --- src/frontends/qt4/Menus.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 1646bc4125..e4cbeeee60 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -1615,7 +1615,7 @@ void MenuDefinition::expandCaptions(Buffer const * buf, bool switchcap) return; if (caps.size() == 1) { docstring dummy; - docstring type = split(*caps.begin(), dummy, ':'); + docstring const type = split(*caps.begin(), dummy, ':'); add(MenuItem(MenuItem::Command, qt_("Caption"), FuncRequest(LFUN_CAPTION_INSERT, translateIfPossible(type)))); return; @@ -1628,16 +1628,17 @@ void MenuDefinition::expandCaptions(Buffer const * buf, bool switchcap) for (int ii = 1; cit != end; ++cit, ++ii) { docstring dummy; - docstring type = split(*cit, dummy, ':'); - docstring item = bformat(_("Caption (%1$s)"), translateIfPossible(type)); + docstring const type = split(*cit, dummy, ':'); + docstring const trtype = translateIfPossible(type); + docstring const cmitem = bformat(_("Caption (%1$s)"), trtype); if (switchcap) - addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(item), + addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(cmitem), FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype ") + type), QString(), true)); else captions.addWithStatusCheck(MenuItem(MenuItem::Command, - toqstr(item), + toqstr(trtype), FuncRequest(LFUN_CAPTION_INSERT, type), QString(), true)); } -- 2.39.2