diff options
author | Eike Ziller <eike.ziller@digia.com> | 2014-10-09 16:03:27 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2014-10-13 11:17:52 +0200 |
commit | 85a6ea6c98d6ce5bd20f759d66d4c5751199471a (patch) | |
tree | c9403c952484d569bba52c78d7321683dc92c8ca /src/plugins/help/searchwidget.cpp | |
parent | 3c59cdd0319fbf1099f378907aeac514d1d57810 (diff) |
(Help)SideBar fixes
1. Get rid of the need to remember the side bar items, instead use the
IDs for activation.
2. Fix issue with empty side bar that cannot be shown, if settings exist
but contain invalid item IDs.
3. Use actual IDs instead of translated window titles for item IDs. This
requires using a different settings group to avoid issues with 2. when
going back to earlier versions of Qt Creator.
Change-Id: I1a760aa5a019db3231803af1bb72f83db49ba6b0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/help/searchwidget.cpp')
-rw-r--r-- | src/plugins/help/searchwidget.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/help/searchwidget.cpp b/src/plugins/help/searchwidget.cpp index 8c2ec3381b3..e6c609a2df7 100644 --- a/src/plugins/help/searchwidget.cpp +++ b/src/plugins/help/searchwidget.cpp @@ -28,6 +28,7 @@ ****************************************************************************/ #include "searchwidget.h" +#include "helpconstants.h" #include "localhelpmanager.h" #include "openpagesmanager.h" @@ -51,8 +52,6 @@ #include <QTextBrowser> #include <QToolButton> -static const char SB_SEARCH[] = QT_TRANSLATE_NOOP("Help::Internal::HelpPlugin", "Search"); - using namespace Help::Internal; SearchWidget::SearchWidget() @@ -271,9 +270,9 @@ void SearchWidget::contextMenuEvent(QContextMenuEvent *contextMenuEvent) // #pragma mark -- SearchSideBarItem SearchSideBarItem::SearchSideBarItem() - : SideBarItem(new SearchWidget, QLatin1String(SB_SEARCH)) + : SideBarItem(new SearchWidget, QLatin1String(Constants::HELP_SEARCH)) { - widget()->setWindowTitle(tr(SB_SEARCH)); + widget()->setWindowTitle(tr(Constants::SB_SEARCH)); connect(widget(), SIGNAL(linkActivated(QUrl)), this, SIGNAL(linkActivated(QUrl))); } |