diff options
Diffstat (limited to 'src/plugins/help/helpplugin.cpp')
-rw-r--r-- | src/plugins/help/helpplugin.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 57c7e769ac..4fca676f65 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -120,10 +120,8 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) Q_UNUSED(arguments) Q_UNUSED(error) m_core = Core::ICore::instance(); - QList<int> globalcontext; - globalcontext << Core::Constants::C_GLOBAL_ID; - QList<int> modecontext; - modecontext << m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_MODE_HELP); + Core::Context globalcontext(Core::Constants::C_GLOBAL_ID); + Core::Context modecontext(m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_MODE_HELP)); const QString &locale = qApp->property("qtc_locale").toString(); if (!locale.isEmpty()) { @@ -304,7 +302,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) this, SLOT(modeChanged(Core::IMode*))); addAutoReleasedObject(m_mode = new HelpMode(m_splitter, m_centralWidget)); - m_mode->setContext(QList<int>() << modecontext); + m_mode->setContext(modecontext); return true; } @@ -343,9 +341,8 @@ void HelpPlugin::aboutToShutdown() void HelpPlugin::setupUi() { // side bar widgets and shortcuts - QList<int> modecontext; Core::ActionManager *am = m_core->actionManager(); - modecontext << m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_MODE_HELP); + Core::Context modecontext(m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_MODE_HELP)); IndexWindow *indexWindow = new IndexWindow(); indexWindow->setWindowTitle(tr(SB_INDEX)); @@ -523,12 +520,12 @@ void HelpPlugin::createRightPaneContextViewer() Aggregation::Aggregate *agg = new Aggregation::Aggregate(); agg->add(m_helpViewerForSideBar); agg->add(new HelpViewerFindSupport(m_helpViewerForSideBar)); - m_core->addContextObject(new Core::BaseContext(m_helpViewerForSideBar, QList<int>() - << m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_HELP_SIDEBAR), this)); + m_core->addContextObject(new Core::BaseContext(m_helpViewerForSideBar,Core::Context( + m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_HELP_SIDEBAR)), this)); QAction *copy = new QAction(this); Core::Command *cmd = m_core->actionManager()->registerAction(copy, Core::Constants::COPY, - QList<int>() << m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_HELP_SIDEBAR)); + Core::Context(m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_HELP_SIDEBAR))); copy->setText(cmd->action()->text()); copy->setIcon(cmd->action()->icon()); |