diff options
Diffstat (limited to 'src/plugins/help')
-rw-r--r-- | src/plugins/help/helpmode.cpp | 29 | ||||
-rw-r--r-- | src/plugins/help/helpmode.h | 14 | ||||
-rw-r--r-- | src/plugins/help/helpplugin.cpp | 7 |
3 files changed, 10 insertions, 40 deletions
diff --git a/src/plugins/help/helpmode.cpp b/src/plugins/help/helpmode.cpp index 37430e64c5..2fda129a2c 100644 --- a/src/plugins/help/helpmode.cpp +++ b/src/plugins/help/helpmode.cpp @@ -39,29 +39,12 @@ using namespace Help; using namespace Help::Internal; HelpMode::HelpMode(QObject *parent) - : Core::IMode(parent), - m_widget(0), - m_icon(QLatin1String(":/fancyactionbar/images/mode_Reference.png")) + : Core::IMode(parent) { setObjectName(QLatin1String("HelpMode")); -} - -QString HelpMode::displayName() const -{ - return QCoreApplication::translate("Help::Internal::HelpMode", "Help"); -} - -int HelpMode::priority() const -{ - return Constants::P_MODE_HELP; -} - -QString HelpMode::id() const -{ - return QLatin1String(Constants::ID_MODE_HELP); -} - -Core::Context HelpMode::context() const -{ - return Core::Context(Constants::C_MODE_HELP); + setContext(Core::Context(Constants::C_MODE_HELP)); + setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Reference.png"))); + setDisplayName(QCoreApplication::translate("Help::Internal::HelpMode", "Help")); + setPriority(Constants::P_MODE_HELP); + setId(Constants::ID_MODE_HELP); } diff --git a/src/plugins/help/helpmode.h b/src/plugins/help/helpmode.h index 52aa3228df..7ba98fb1de 100644 --- a/src/plugins/help/helpmode.h +++ b/src/plugins/help/helpmode.h @@ -45,20 +45,6 @@ class HelpMode : public Core::IMode { public: explicit HelpMode(QObject *parent = 0); - - QString displayName() const; - QIcon icon() const { return m_icon; } - int priority() const; - QWidget *widget() { return m_widget; } - QString id() const; - QString type() const { return QString(); } - Core::Context context() const; - QString contextHelpId() const { return QString(); } - void setWidget(QWidget *widget) { m_widget = widget; } - -private: - QWidget *m_widget; - QIcon m_icon; }; } // namespace Internal diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 89d006c920..6f6317a481 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -69,7 +69,6 @@ #include <find/findplugin.h> #include <texteditor/texteditorconstants.h> #include <utils/styledbar.h> -#include <welcome/welcomemode.h> #include <QtCore/QDir> #include <QtCore/QFileInfo> @@ -579,8 +578,10 @@ void HelpPlugin::createRightPaneContextViewer() agg->add(new HelpViewerFindSupport(m_helpViewerForSideBar)); Core::Context context(Constants::C_HELP_SIDEBAR); - m_core->addContextObject(new Core::BaseContext(m_helpViewerForSideBar, - context, this)); + Core::IContext *icontext = new Core::IContext(this); + icontext->setContext(context); + icontext->setWidget(m_helpViewerForSideBar); + m_core->addContextObject(icontext); QAction *copy = new QAction(this); Core::Command *cmd = m_core->actionManager()->registerAction(copy, |