Commit 79428126 authored by Gabriel de Dietrich's avatar Gabriel de Dietrich Committed by Eike Ziller
Browse files

Set NoRole menu role on toggle fullscreen action

Again, since the default menu role is TextHeuristicRole, and when we
enter fullscreen the text is set to "Exit Full Screen", the Mac QPA
menu item syncing will assign this to be the quit menu item.

This would cause two problems. First, pressing Cmd-Q in fullscreen would leave
fullscreen mode instead of quitting the app. Second, that would make the quit
menu item to be hidden when leaving fullscreen, since the toggle fullscreen
action text would change back to "Enter Full Screen", and the make a round
trip to the menu item heuristic logic.

Task-number: QTBUG-30654
Change-Id: I7524c54c3bd77cce891c57292825f02e163fd7fa
Reviewed-by: default avatarEike Ziller <>
parent cf2b3f2e
......@@ -753,6 +753,7 @@ void MainWindow::registerDefaultActions()
if (supportsFullScreen) {
// Full Screen Action
m_toggleFullScreenAction = new QAction(fullScreenActionText, this);
cmd = ActionManager::registerAction(m_toggleFullScreenAction, Constants::TOGGLE_FULLSCREEN, globalContext);
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Meta+F") : tr("Ctrl+Shift+F11")));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment