forked from qt-creator/qt-creator
Introduced a single convenient function for updating additional contexts
While before you had to call add, then remove for each context id and then call update, now you call updateAdditionalContexts with a list of contexts to remove and add. It has the update step built in. Reviewed-by: con
This commit is contained in:
@@ -187,16 +187,9 @@ QStatusBar *CoreImpl::statusBar() const
|
||||
return m_mainwindow->statusBar();
|
||||
}
|
||||
|
||||
// adds and removes additional active contexts, this context is appended to the
|
||||
// currently active contexts. call updateContext after changing
|
||||
void CoreImpl::addAdditionalContext(int context)
|
||||
void CoreImpl::updateAdditionalContexts(const QList<int> &remove, const QList<int> &add)
|
||||
{
|
||||
m_mainwindow->addAdditionalContext(context);
|
||||
}
|
||||
|
||||
void CoreImpl::removeAdditionalContext(int context)
|
||||
{
|
||||
m_mainwindow->removeAdditionalContext(context);
|
||||
m_mainwindow->updateAdditionalContexts(remove, add);
|
||||
}
|
||||
|
||||
bool CoreImpl::hasContext(int context) const
|
||||
@@ -214,11 +207,6 @@ void CoreImpl::removeContextObject(IContext *context)
|
||||
m_mainwindow->removeContextObject(context);
|
||||
}
|
||||
|
||||
void CoreImpl::updateContext()
|
||||
{
|
||||
return m_mainwindow->updateContext();
|
||||
}
|
||||
|
||||
void CoreImpl::openFiles(const QStringList &arguments)
|
||||
{
|
||||
m_mainwindow->openFiles(arguments);
|
||||
|
||||
Reference in New Issue
Block a user