Showing the changes to interface/src/Menu.cpp (1 of 10 files). Show all
Unified · Split
| @@ -72,7 +72,8 @@ Menu::Menu() : · 71 unmodified lines | |||
| 72 | MenuOption::AboutApp, | 72 | MenuOption::AboutApp, |
| 73 | 0, | 73 | 0, |
| 74 | this, | 74 | this, |
| 75 | SLOT(aboutApp())); | 75 | SLOT(aboutApp()), |
| 76 | QAction::AboutRole); | ||
| 76 | #endif | 77 | #endif |
| 77 | 78 | ||
| 78 | (addActionToQMenuAndActionHash(fileMenu, | 79 | (addActionToQMenuAndActionHash(fileMenu, |
| @@ -120,7 +121,9 @@ Menu::Menu() : · 41 unmodified lines | |||
| 120 | MenuOption::Quit, | 121 | MenuOption::Quit, |
| 121 | Qt::CTRL | Qt::Key_Q, | 122 | Qt::CTRL | Qt::Key_Q, |
| 122 | appInstance, | 123 | appInstance, |
| 123 | SLOT(quit())); | 124 | SLOT(quit()), |
| 125 | QAction::QuitRole); | ||
| 126 | |||
| 124 | 127 | ||
| 125 | QMenu* editMenu = addMenu("Edit"); | 128 | QMenu* editMenu = addMenu("Edit"); |
| 126 | 129 | ||
| @@ -128,7 +131,8 @@ Menu::Menu() : · 1 unmodified line | |||
| 128 | MenuOption::Preferences, | 131 | MenuOption::Preferences, |
| 129 | Qt::CTRL | Qt::Key_Comma, | 132 | Qt::CTRL | Qt::Key_Comma, |
| 130 | this, | 133 | this, |
| 131 | SLOT(editPreferences())); | 134 | SLOT(editPreferences()), |
| 135 | QAction::PreferencesRole); | ||
| 132 | 136 | ||
| 133 | addDisabledActionAndSeparator(editMenu, "Voxels"); | 137 | addDisabledActionAndSeparator(editMenu, "Voxels"); |
| 134 | 138 | ||
| @@ -681,7 +685,8 @@ QAction* Menu::addActionToQMenuAndActionHash(QMenu* destinationMenu, · 546 unmodified lines | |||
| 681 | const QString actionName, | 685 | const QString actionName, |
| 682 | const QKeySequence& shortcut, | 686 | const QKeySequence& shortcut, |
| 683 | const QObject* receiver, | 687 | const QObject* receiver, |
| 684 | const char* member) { | 688 | const char* member, |
| 689 | QAction::MenuRole role) { | ||
| 685 | QAction* action; | 690 | QAction* action; |
| 686 | 691 | ||
| 687 | if (receiver && member) { | 692 | if (receiver && member) { |
| @@ -690,6 +695,7 @@ QAction* Menu::addActionToQMenuAndActionHash(QMenu* destinationMenu, · 2 unmodified lines | |||
| 690 | action = destinationMenu->addAction(actionName); | 695 | action = destinationMenu->addAction(actionName); |
| 691 | action->setShortcut(shortcut); | 696 | action->setShortcut(shortcut); |
| 692 | } | 697 | } |
| 698 | action->setMenuRole(role); | ||
| 693 | 699 | ||
| 694 | _actionHash.insert(actionName, action); | 700 | _actionHash.insert(actionName, action); |
| 695 | 701 | ||