[LyX/master] Whitespace and range
Richard Kimberly Heck
rikiheck at lyx.org
Wed Aug 16 21:25:25 UTC 2023
commit 62483d102d93c401b7f1d550f0ef087ea615b211
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Wed Aug 16 18:14:48 2023 -0400
Whitespace and range
---
src/frontends/qt/LayoutBox.cpp | 1 -
src/frontends/qt/Menus.cpp | 20 ++++++++------------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/frontends/qt/LayoutBox.cpp b/src/frontends/qt/LayoutBox.cpp
index 435bd47..ed80332 100644
--- a/src/frontends/qt/LayoutBox.cpp
+++ b/src/frontends/qt/LayoutBox.cpp
@@ -590,7 +590,6 @@ void LayoutBox::updateContents(bool reset)
d->model_->clear();
DocumentClass::const_iterator lit = d->text_class_->begin();
DocumentClass::const_iterator len = d->text_class_->end();
-
for (; lit != len; ++lit) {
docstring const & name = lit->name();
bool const useEmpty = d->inset_->forcePlainLayout() || d->inset_->usePlainLayout();
diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp
index 8f62bd4..49f99cf 100644
--- a/src/frontends/qt/Menus.cpp
+++ b/src/frontends/qt/Menus.cpp
@@ -2438,7 +2438,6 @@ void Menus::Impl::expand(MenuDefinition const & frommenu,
case MenuItem::InfoArguments:
tomenu.expandInfoArguments(bv);
break;
-
case MenuItem::Toc:
tomenu.expandToc(buf);
@@ -2664,28 +2663,25 @@ void Menus::fillMenuBar(QMenuBar * qmb, GuiView * view, bool initial)
bv = view->currentBufferView();
d->expand(d->menubar_, menu, bv);
- MenuDefinition::const_iterator m = menu.begin();
- MenuDefinition::const_iterator end = menu.end();
-
- for (; m != end; ++m) {
+ for (auto const & m : menu) {
- if (m->kind() != MenuItem::Submenu) {
- LYXERR(Debug::GUI, "\tERROR: not a submenu " << m->label());
+ if (m.kind() != MenuItem::Submenu) {
+ LYXERR(Debug::GUI, "\tERROR: not a submenu " << m.label());
continue;
}
- LYXERR(Debug::GUI, "menu bar item " << m->label()
- << " is a submenu named " << m->submenuname());
+ LYXERR(Debug::GUI, "menu bar item " << m.label()
+ << " is a submenu named " << m.submenuname());
- QString name = m->submenuname();
+ QString name = m.submenuname();
if (!d->hasMenu(name)) {
LYXERR(Debug::GUI, "\tERROR: " << name
<< " submenu has no menu!");
continue;
}
- Menu * menuptr = new Menu(view, m->submenuname(), true);
- menuptr->setTitle(label(*m));
+ Menu * menuptr = new Menu(view, m.submenuname(), true);
+ menuptr->setTitle(label(m));
#if defined(Q_OS_MAC)
// On Mac OS with Qt/Cocoa, the menu is not displayed if there is no action
More information about the lyx-cvs
mailing list