]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/QLMenubar.C
Change MenuBackend and the other menuclasses to store a docstring. Do the required...
[features.git] / src / frontends / qt4 / QLMenubar.C
index b64d5516324f2dc7318c09bbfd32d4f3efb1c8c8..8857d1ca61416bbcc4a7e200749b1c31b33c29aa 100644 (file)
@@ -47,10 +47,10 @@ QLMenubar::QLMenubar(LyXView * view, MenuBackend & mbe)
 {
        macxMenuBarInit();
 
-       lyxerr[Debug::GUI] << "populating menu bar" << menubackend_.getMenubar().name() << endl;
+       lyxerr[Debug::GUI] << "populating menu bar" << lyx::to_utf8(menubackend_.getMenubar().name()) << endl;
 
        if (menubackend_.getMenubar().size() == 0) {
-               lyxerr[Debug::GUI] << "\tERROR: empty menu bar" << menubackend_.getMenubar().name() << endl;
+               lyxerr[Debug::GUI] << "\tERROR: empty menu bar" << lyx::to_utf8(menubackend_.getMenubar().name()) << endl;
                return;
                //                      continue;
        }
@@ -68,15 +68,15 @@ QLMenubar::QLMenubar(LyXView * view, MenuBackend & mbe)
        for (; m != end; ++m) {
 
                if (m->kind() != MenuItem::Submenu) {
-                       lyxerr[Debug::GUI] << "\tERROR: not a submenu " << m->label() << endl;
+                       lyxerr[Debug::GUI] << "\tERROR: not a submenu " << lyx::to_utf8(m->label()) << endl;
                        continue;
                }
 
-               lyxerr[Debug::GUI] << "menu bar item " << m->label() << " is a submenu named " << m->submenuname() << endl;
+               lyxerr[Debug::GUI] << "menu bar item " << lyx::to_utf8(m->label()) << " is a submenu named " << lyx::to_utf8(m->submenuname()) << endl;
 
-               string name = m->submenuname();
+               docstring name = m->submenuname();
                if (!menubackend_.hasMenu(name)) {
-                       lyxerr[Debug::GUI] << "\tERROR: " << name << " submenu has no menu!" << endl;
+                       lyxerr[Debug::GUI] << "\tERROR: " << lyx::to_utf8(name) << " submenu has no menu!" << endl;
                        continue;
                }
 
@@ -88,7 +88,7 @@ QLMenubar::QLMenubar(LyXView * view, MenuBackend & mbe)
 
                pair<NameMap::iterator, bool> I = name_map_.insert(make_pair(name, qMenu));
                if (!I.second) {
-                       lyxerr[Debug::GUI] << "\tERROR: " << name << " submenu is already there!" << endl;
+                       lyxerr[Debug::GUI] << "\tERROR: " << lyx::to_utf8(name) << " submenu is already there!" << endl;
                }
 /*
                QObject::connect(qMenu, SIGNAL(aboutToShow()), this, SLOT(update()));
@@ -99,7 +99,7 @@ QLMenubar::QLMenubar(LyXView * view, MenuBackend & mbe)
        //QObject::connect(owner_->menuBar(), SIGNAL(triggered()), this, SLOT(update()));
 }
 
-void QLMenubar::openByName(string const & name)
+void QLMenubar::openByName(docstring const & name)
 {
        NameMap::const_iterator const cit = name_map_.find(name);
        if (cit == name_map_.end())