mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
fix compilation on mac
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20653 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fc742ab7d2
commit
522c624821
@ -96,6 +96,12 @@ GuiMenubar::GuiMenubar(LyXView * view, MenuBackend & mbe)
|
||||
}
|
||||
|
||||
|
||||
GuiMenubar::~GuiMenubar() {
|
||||
#ifdef Q_WS_MACX
|
||||
delete mac_menubar_;
|
||||
#endif
|
||||
}
|
||||
|
||||
void GuiMenubar::openByName(QString const & name)
|
||||
{
|
||||
if (QMenu * menu = name_map_.value(name))
|
||||
@ -142,7 +148,7 @@ extern void qt_mac_set_menubar_merge(bool b);
|
||||
void GuiMenubar::macxMenuBarInit()
|
||||
{
|
||||
#ifdef Q_WS_MACX
|
||||
mac_menubar_.reset(new QMenuBar);
|
||||
mac_menubar_ = new QMenuBar;
|
||||
|
||||
# if QT_VERSION >= 0x040200
|
||||
/* Since Qt 4.2, the qt/mac menu code has special code for
|
||||
@ -198,8 +204,9 @@ void GuiMenubar::macxMenuBarInit()
|
||||
Menu::const_iterator cit = menubackend_.specialMenu().begin();
|
||||
Menu::const_iterator end = menubackend_.specialMenu().end();
|
||||
for (size_t i = 0 ; cit != end ; ++cit, ++i) {
|
||||
Action * action = new Action(*owner_, cit->label(),
|
||||
cit->func());
|
||||
Action * action = new Action(*owner_, QString(),
|
||||
toqstr(cit->label()),
|
||||
cit->func(), QString());
|
||||
action->setMenuRole(entries[i].role);
|
||||
qMenu->addAction(action);
|
||||
|
||||
|
@ -34,6 +34,8 @@ class GuiMenubar : public QObject
|
||||
public:
|
||||
GuiMenubar(LyXView *, MenuBackend &);
|
||||
|
||||
~GuiMenubar();
|
||||
|
||||
/// opens a top-level submenu given its name
|
||||
void openByName(QString const & name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user