From f811edf4a28d06c4e36ebbe2a69d8c75ea64810f Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 24 Oct 2023 09:08:16 +0200 Subject: [PATCH] Help: Fix text of View > Show Left Sidebar check item The text should never be "Hide Left Sidebar", because it is a checked item. Just set the tooltip, like done in coreplugin/navigationwidget.cpp Task-number: QTCREATORBUG-27733 Change-Id: I0cda56712724a69cb08411e62be57b88909416fe Reviewed-by: Jarek Kobus --- src/plugins/help/helpwidget.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp index a2d9eca985a..daa6e83c576 100644 --- a/src/plugins/help/helpwidget.cpp +++ b/src/plugins/help/helpwidget.cpp @@ -229,11 +229,14 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget m_toggleSideBarAction->setChecked(false); cmd = Core::ActionManager::registerAction(m_toggleSideBarAction, Core::Constants::TOGGLE_LEFT_SIDEBAR, context); - connect(m_toggleSideBarAction, &QAction::toggled, m_toggleSideBarAction, [this](bool checked) { - m_toggleSideBarAction->setText(::Core::Tr::tr( - checked ? Core::Constants::TR_HIDE_LEFT_SIDEBAR - : Core::Constants::TR_SHOW_LEFT_SIDEBAR)); - }); + connect(m_toggleSideBarAction, + &QAction::toggled, + m_toggleSideBarAction, + [this](bool checked) { + m_toggleSideBarAction->setToolTip( + ::Core::Tr::tr(checked ? Core::Constants::TR_HIDE_LEFT_SIDEBAR + : Core::Constants::TR_SHOW_LEFT_SIDEBAR)); + }); addSideBar(); m_toggleSideBarAction->setChecked(m_sideBar->isVisibleTo(this)); connect(m_toggleSideBarAction, &QAction::triggered, m_sideBar, &Core::SideBar::setVisible);