forked from qt-creator/qt-creator
core: use a class derived from QList<int> instead of a QList<int> for Core::Context
A mostly mechanical change. Reviewed-By: con
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user