forked from qt-creator/qt-creator
Change contextChanged signal to also notify about additional contexts.
This commit is contained in:
@@ -321,7 +321,7 @@ BookmarkManager::BookmarkManager() :
|
||||
m_bookmarkIcon(QLatin1String(":/bookmarks/images/bookmark.png")),
|
||||
m_selectionModel(new QItemSelectionModel(this, this))
|
||||
{
|
||||
connect(Core::ICore::instance(), SIGNAL(contextChanged(Core::IContext*)),
|
||||
connect(Core::ICore::instance(), SIGNAL(contextChanged(Core::IContext*,QList<int>)),
|
||||
this, SLOT(updateActionStatus()));
|
||||
|
||||
connect(ProjectExplorerPlugin::instance()->session(), SIGNAL(sessionLoaded()),
|
||||
|
||||
@@ -149,7 +149,7 @@ FileManager::FileManager(QMainWindow *mw)
|
||||
this, SLOT(changedFile(QString)));
|
||||
connect(d->m_mainWindow, SIGNAL(windowActivated()),
|
||||
this, SLOT(mainWindowActivated()));
|
||||
connect(core, SIGNAL(contextChanged(Core::IContext*)),
|
||||
connect(core, SIGNAL(contextChanged(Core::IContext*,QList<int>)),
|
||||
this, SLOT(syncWithEditor(Core::IContext*)));
|
||||
|
||||
const QSettings *s = core->settings();
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void ICore::contextChanged(Core::IContext *context)
|
||||
\fn void ICore::contextChanged(Core::IContext *context, const QList<int> &additionalContexts)
|
||||
\brief Sent just after a new \a context became the current context
|
||||
(meaning that its widget got focus).
|
||||
(meaning that its widget got focus), or if the additional context ids changed.
|
||||
*/
|
||||
|
||||
@@ -124,7 +124,7 @@ signals:
|
||||
void optionsDialogRequested();
|
||||
void coreAboutToClose();
|
||||
void contextAboutToChange(Core::IContext *context);
|
||||
void contextChanged(Core::IContext *context);
|
||||
void contextChanged(Core::IContext *context, const QList<int> &additionalContexts);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
@@ -1096,7 +1096,6 @@ void MainWindow::updateContextObject(IContext *context)
|
||||
if (debugMainWindow)
|
||||
qDebug() << "new context object =" << context << (context ? context->widget() : 0)
|
||||
<< (context ? context->widget()->metaObject()->className() : 0);
|
||||
emit m_coreImpl->contextChanged(context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1215,6 +1214,7 @@ void MainWindow::updateContext()
|
||||
}
|
||||
|
||||
m_actionManager->setContext(uniquecontexts);
|
||||
emit m_coreImpl->contextChanged(m_activeContext, m_additionalContexts);
|
||||
}
|
||||
|
||||
void MainWindow::aboutToShowRecentFiles()
|
||||
|
||||
@@ -173,7 +173,7 @@ StateListener::StateListener(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
Core::ICore *core = Core::ICore::instance();
|
||||
connect(core, SIGNAL(contextChanged(Core::IContext *)),
|
||||
connect(core, SIGNAL(contextChanged(Core::IContext*,QList<int>)),
|
||||
this, SLOT(slotStateChanged()));
|
||||
connect(core->fileManager(), SIGNAL(currentFileChanged(QString)),
|
||||
this, SLOT(slotStateChanged()));
|
||||
|
||||
Reference in New Issue
Block a user