]> git.lyx.org Git - features.git/commitdiff
Remove special GlobalMenuBar class. As Patrick De Visschere pointed out it is not...
authorStephan Witt <switt@lyx.org>
Sun, 24 Aug 2014 18:29:52 +0000 (20:29 +0200)
committerStephan Witt <switt@lyx.org>
Sun, 24 Aug 2014 18:29:52 +0000 (20:29 +0200)
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiApplication.h

index 5ee0c5883f5917a38c3fb87afbf44c4fb986c35b..56cbd604170de26385b4dc7b73a42259e2d591d4 100644 (file)
@@ -651,28 +651,6 @@ public:
        }
 };
 
-class GlobalMenuBar : public QMenuBar
-{
-public:
-       ///
-       GlobalMenuBar() : QMenuBar(0) {}
-
-       ///
-       bool event(QEvent * e)
-       {
-               if (e->type() == QEvent::ShortcutOverride) {
-                       //          && activeWindow() == 0) {
-                       QKeyEvent * ke = static_cast<QKeyEvent*>(e);
-                       KeySymbol sym;
-                       setKeySymbol(&sym, ke);
-                       guiApp->processKeySym(sym, q_key_state(ke->modifiers()));
-                       e->accept();
-                       return true;
-               }
-               return false;
-       }
-};
-
 #ifdef Q_WS_MACX
 // QMacPasteboardMimeGraphics can only be compiled on Mac.
 
@@ -951,7 +929,7 @@ struct GuiApplication::Private
        QHash<int, GuiView *> views_;
 
        /// Only used on mac.
-       GlobalMenuBar * global_menubar_;
+       QMenuBar * global_menubar_;
 
 #ifdef Q_WS_MACX
        /// Linkback mime handler for MacOSX.
@@ -2350,7 +2328,7 @@ void GuiApplication::execBatchCommands()
        // Create the global default menubar which is shown for the dialogs
        // and if no GuiView is visible.
        // This must be done after the session was recovered to know the "last files".
-       d->global_menubar_ = new GlobalMenuBar;
+       d->global_menubar_ = new QMenuBar(0);
        d->menus_.fillMenuBar(d->global_menubar_, 0, true);
 #endif
 
index 57b37836c6a40c3e857a459549b8099819e78c30..3d5b2d2d0f22fe5197c8e2b76c67dc74b1df0b4e 100644 (file)
@@ -37,7 +37,6 @@ class FileName;
 namespace frontend {
 
 class GuiView;
-class GlobalMenuBar;
 class GuiWorkArea;
 class Menus;
 class SocketNotifier;