Whitespace and range

This commit is contained in:
Richard Kimberly Heck 2023-08-16 18:14:48 -04:00
parent d312b32ec8
commit 62483d102d
2 changed files with 8 additions and 13 deletions

View File

@ -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();

View File

@ -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 (auto const & m : menu) {
for (; m != end; ++m) {
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