From 6beb9f973cbd0ccf4496b590416bb61da2178992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Wed, 16 Apr 2008 20:42:33 +0000 Subject: [PATCH] replace with simpler fix, thx Andre git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24301 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/Menus.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index e591b8bd37..74a43ebe27 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -1130,7 +1130,7 @@ void Menu::Impl::populate(QMenu & qMenu, MenuDefinition const & menu) ///////////////////////////////////////////////////////////////////// Menu::Menu(GuiView * gv, QString const & name, bool top_level) -: d(new Menu::Impl) +: QMenu(gv), d(new Menu::Impl) { d->top_level_menu = top_level? new MenuDefinition : 0; d->view = gv; @@ -1189,7 +1189,7 @@ struct Menus::Impl { /// MenuDefinition menubar_; - typedef QMap > > NameMap; + typedef QMap > NameMap; /// name to menu for \c menu() method. NameMap name_map_; @@ -1519,7 +1519,7 @@ void Menus::fillMenuBar(QMenuBar * qmb, GuiView * view, bool initial) menu->setTitle(label(*m)); qmb->addMenu(menu); - d->name_map_[view][name] = boost::shared_ptr(menu); + d->name_map_[view][name] = menu; } } @@ -1554,14 +1554,14 @@ void Menus::updateMenu(Menu * qmenu) Menu * Menus::menu(QString const & name, GuiView & view) { LYXERR(Debug::GUI, "Context menu requested: " << fromqstr(name)); - Menu * menu = d->name_map_[&view].value(name, boost::shared_ptr()).get(); + Menu * menu = d->name_map_[&view].value(name, 0); if (!menu && !name.startsWith("context-")) { LYXERR0("requested context menu not found: " << fromqstr(name)); return 0; } menu = new Menu(&view, name, true); - d->name_map_[&view][name] = boost::shared_ptr(menu); + d->name_map_[&view][name] = menu; return menu; }