From 6302a28c977bbf9b6914f68b2d8565ea6d2921d3 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 21 Apr 2015 14:48:04 +0200 Subject: Fix translation of help navigation panes Change-Id: Ia82609d55311698ca675943cdfe7b2b91d6f59c2 Task-number: QTCREATORBUG-14241 Reviewed-by: hjk --- src/plugins/help/helpwidget.cpp | 8 ++++---- src/plugins/help/searchwidget.cpp | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp index 0d62fa81a1..69d07e4b21 100644 --- a/src/plugins/help/helpwidget.cpp +++ b/src/plugins/help/helpwidget.cpp @@ -303,7 +303,7 @@ void HelpWidget::addSideBar() auto contentWindow = new ContentWindow; auto contentItem = new Core::SideBarItem(contentWindow, QLatin1String(Constants::HELP_CONTENTS)); contentWindow->setOpenInNewPageActionVisible(supportsNewPages); - contentWindow->setWindowTitle(tr(Constants::SB_CONTENTS)); + contentWindow->setWindowTitle(HelpPlugin::tr(Constants::SB_CONTENTS)); connect(contentWindow, &ContentWindow::linkActivated, this, &HelpWidget::open); m_contentsAction = new QAction(tr(Constants::SB_CONTENTS), this); @@ -315,7 +315,7 @@ void HelpWidget::addSideBar() auto indexWindow = new IndexWindow(); auto indexItem = new Core::SideBarItem(indexWindow, QLatin1String(Constants::HELP_INDEX)); indexWindow->setOpenInNewPageActionVisible(supportsNewPages); - indexWindow->setWindowTitle(tr(Constants::SB_INDEX)); + indexWindow->setWindowTitle(HelpPlugin::tr(Constants::SB_INDEX)); connect(indexWindow, &IndexWindow::linkActivated, this, &HelpWidget::open); connect(indexWindow, &IndexWindow::linksActivated, @@ -327,7 +327,7 @@ void HelpWidget::addSideBar() shortcutMap.insert(QLatin1String(Constants::HELP_INDEX), cmd); auto bookmarkWidget = new BookmarkWidget(&LocalHelpManager::bookmarkManager()); - bookmarkWidget->setWindowTitle(tr(Constants::SB_BOOKMARKS)); + bookmarkWidget->setWindowTitle(HelpPlugin::tr(Constants::SB_BOOKMARKS)); bookmarkWidget->setOpenInNewPageActionVisible(supportsNewPages); auto bookmarkItem = new Core::SideBarItem(bookmarkWidget, QLatin1String(Constants::HELP_BOOKMARKS)); @@ -351,7 +351,7 @@ void HelpWidget::addSideBar() Core::SideBarItem *openPagesItem = 0; if (m_style == ModeWidget) { QWidget *openPagesWidget = OpenPagesManager::instance().openPagesWidget(); - openPagesWidget->setWindowTitle(tr(Constants::SB_OPENPAGES)); + openPagesWidget->setWindowTitle(HelpPlugin::tr(Constants::SB_OPENPAGES)); openPagesItem = new Core::SideBarItem(openPagesWidget, QLatin1String(Constants::HELP_OPENPAGES)); m_openPagesAction = new QAction(tr("Activate Open Help Pages View"), this); diff --git a/src/plugins/help/searchwidget.cpp b/src/plugins/help/searchwidget.cpp index 27dba03a9d..8a993eb942 100644 --- a/src/plugins/help/searchwidget.cpp +++ b/src/plugins/help/searchwidget.cpp @@ -30,6 +30,7 @@ #include "searchwidget.h" #include "helpconstants.h" +#include "helpplugin.h" #include "localhelpmanager.h" #include "openpagesmanager.h" @@ -303,7 +304,7 @@ QStringList SearchWidget::currentSearchTerms() const SearchSideBarItem::SearchSideBarItem() : SideBarItem(new SearchWidget, QLatin1String(Constants::HELP_SEARCH)) { - widget()->setWindowTitle(tr(Constants::SB_SEARCH)); + widget()->setWindowTitle(HelpPlugin::tr(Constants::SB_SEARCH)); connect(widget(), SIGNAL(linkActivated(QUrl,QStringList,bool)), this, SIGNAL(linkActivated(QUrl,QStringList,bool))); } -- cgit v1.2.1