From e51b378ac989bede498a5b445d7ca84cb9b02ea2 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 18 Oct 2023 15:18:10 +0200 Subject: [PATCH] Core/Tr: Fix menu bar action It is "menu bar", and use placeholder for shortcut instead of concatenation. Change-Id: I60094a5fac3893663180f7ef573b6dece7670111 Reviewed-by: Jarek Kobus Reviewed-by: Leena Miettinen --- dist/changelog/changes-12.0.0.md | 2 +- .../creator-how-to-show-and-hide-main-menu.qdoc | 2 +- src/plugins/coreplugin/icore.cpp | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dist/changelog/changes-12.0.0.md b/dist/changelog/changes-12.0.0.md index 53ad7d575f1..b26621ddf2e 100644 --- a/dist/changelog/changes-12.0.0.md +++ b/dist/changelog/changes-12.0.0.md @@ -67,7 +67,7 @@ General used for the file system index locator filter ([QTCREATORBUG-27789](https://bugreports.qt.io/browse/QTCREATORBUG-27789)) ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-editor-locator.html#locating-files-from-global-file-system-index)) -* Added the `View > Show Menubar` option to hide the menu bar on platforms +* Added the `View > Show Menu Bar` option to hide the menu bar on platforms without a unified menu bar ([QTCREATORBUG-29498](https://bugreports.qt.io/browse/QTCREATORBUG-29498)) ([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-show-and-hide-main-menu.html)) diff --git a/doc/qtcreator/src/user-interface/creator-only/creator-how-to-show-and-hide-main-menu.qdoc b/doc/qtcreator/src/user-interface/creator-only/creator-how-to-show-and-hide-main-menu.qdoc index 4055f0b7d45..22d57b98c27 100644 --- a/doc/qtcreator/src/user-interface/creator-only/creator-how-to-show-and-hide-main-menu.qdoc +++ b/doc/qtcreator/src/user-interface/creator-only/creator-how-to-show-and-hide-main-menu.qdoc @@ -10,7 +10,7 @@ \title Show and hide the main menu On Linux and Windows, you can hide the main menu bar to save space on the - screen. Select \uicontrol View, and deselect the \uicontrol {Show Menubar} + screen. Select \uicontrol View, and deselect the \uicontrol {Show Menu Bar} check box. \image qtcreator-without-menubar.webp {Qt Creator without the main menu} diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index 4a73eb6e9eb..eaf94e45cf5 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -1858,19 +1858,19 @@ void ICorePrivate::registerDefaultActions() // Show Menubar Action if (globalMenuBar() && !globalMenuBar()->isNativeMenuBar()) { - m_toggleMenubarAction = new QAction(Tr::tr("Show Menubar"), this); + m_toggleMenubarAction = new QAction(Tr::tr("Show Menu Bar"), this); m_toggleMenubarAction->setCheckable(true); cmd = ActionManager::registerAction(m_toggleMenubarAction, Constants::TOGGLE_MENUBAR); cmd->setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Alt+M"))); connect(m_toggleMenubarAction, &QAction::toggled, this, [cmd](bool visible) { if (!visible) { - CheckableMessageBox::information( - Core::ICore::dialogParent(), - Tr::tr("Hide Menubar"), - Tr::tr( - "This will hide the menu bar completely. You can show it again by typing ") - + cmd->keySequence().toString(QKeySequence::NativeText), - Key("ToogleMenuBarHint")); + CheckableMessageBox::information(Core::ICore::dialogParent(), + Tr::tr("Hide Menu Bar"), + Tr::tr("This will hide the menu bar completely. " + "You can show it again by typing %1.") + .arg(cmd->keySequence().toString( + QKeySequence::NativeText)), + Key("ToogleMenuBarHint")); } globalMenuBar()->setVisible(visible); });