commit f73091228c9b0661d5a6f9b36da018b77da74a19
Author: Stephan Witt <[email protected]>
Date: Sun Aug 24 20:29:52 2014 +0200
Remove special GlobalMenuBar class. As Patrick De Visschere pointed out it
is not needed. The shortcut handling of Qt does it internally now what
GlobalMenuBar was made for.
diff --git a/src/frontends/qt4/GuiApplication.cpp
b/src/frontends/qt4/GuiApplication.cpp
index 5ee0c58..56cbd60 100644
--- a/src/frontends/qt4/GuiApplication.cpp
+++ b/src/frontends/qt4/GuiApplication.cpp
@@ -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
diff --git a/src/frontends/qt4/GuiApplication.h
b/src/frontends/qt4/GuiApplication.h
index 57b3783..3d5b2d2 100644
--- a/src/frontends/qt4/GuiApplication.h
+++ b/src/frontends/qt4/GuiApplication.h
@@ -37,7 +37,6 @@ class FileName;
namespace frontend {
class GuiView;
-class GlobalMenuBar;
class GuiWorkArea;
class Menus;
class SocketNotifier;