mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 00:56:48 +02:00
fix macos menu placement for About, Preferences, and Quit
This commit is contained in:
parent
4da70cf3c8
commit
73c1ef9997
2 changed files with 13 additions and 5 deletions
|
@ -72,7 +72,8 @@ Menu::Menu() :
|
|||
MenuOption::AboutApp,
|
||||
0,
|
||||
this,
|
||||
SLOT(aboutApp()));
|
||||
SLOT(aboutApp()),
|
||||
QAction::AboutRole);
|
||||
#endif
|
||||
|
||||
(addActionToQMenuAndActionHash(fileMenu,
|
||||
|
@ -120,7 +121,9 @@ Menu::Menu() :
|
|||
MenuOption::Quit,
|
||||
Qt::CTRL | Qt::Key_Q,
|
||||
appInstance,
|
||||
SLOT(quit()));
|
||||
SLOT(quit()),
|
||||
QAction::QuitRole);
|
||||
|
||||
|
||||
QMenu* editMenu = addMenu("Edit");
|
||||
|
||||
|
@ -128,7 +131,8 @@ Menu::Menu() :
|
|||
MenuOption::Preferences,
|
||||
Qt::CTRL | Qt::Key_Comma,
|
||||
this,
|
||||
SLOT(editPreferences()));
|
||||
SLOT(editPreferences()),
|
||||
QAction::PreferencesRole);
|
||||
|
||||
addDisabledActionAndSeparator(editMenu, "Voxels");
|
||||
|
||||
|
@ -679,7 +683,8 @@ QAction* Menu::addActionToQMenuAndActionHash(QMenu* destinationMenu,
|
|||
const QString actionName,
|
||||
const QKeySequence& shortcut,
|
||||
const QObject* receiver,
|
||||
const char* member) {
|
||||
const char* member,
|
||||
QAction::MenuRole role) {
|
||||
QAction* action;
|
||||
|
||||
if (receiver && member) {
|
||||
|
@ -688,6 +693,7 @@ QAction* Menu::addActionToQMenuAndActionHash(QMenu* destinationMenu,
|
|||
action = destinationMenu->addAction(actionName);
|
||||
action->setShortcut(shortcut);
|
||||
}
|
||||
action->setMenuRole(role);
|
||||
|
||||
_actionHash.insert(actionName, action);
|
||||
|
||||
|
|
|
@ -113,7 +113,9 @@ private:
|
|||
const QString actionName,
|
||||
const QKeySequence& shortcut = 0,
|
||||
const QObject* receiver = NULL,
|
||||
const char* member = NULL);
|
||||
const char* member = NULL,
|
||||
QAction::MenuRole role = QAction::NoRole);
|
||||
|
||||
QAction* addCheckableActionToQMenuAndActionHash(QMenu* destinationMenu,
|
||||
const QString actionName,
|
||||
const QKeySequence& shortcut = 0,
|
||||
|
|
Loading…
Reference in a new issue