diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp index e78bcc06522b4c344d288c6ad2869a09c449bc85..62a23af0698db4f245cf29f12524e7a41e53bc64 100644 --- a/src/plugins/bookmarks/bookmarkmanager.cpp +++ b/src/plugins/bookmarks/bookmarkmanager.cpp @@ -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()), diff --git a/src/plugins/coreplugin/filemanager.cpp b/src/plugins/coreplugin/filemanager.cpp index abf93ce88291ad56111f4bdaa1162dbda6d0170e..6d7b7ae6eed4463b72ecdc45e261c3ca6b18b9b3 100644 --- a/src/plugins/coreplugin/filemanager.cpp +++ b/src/plugins/coreplugin/filemanager.cpp @@ -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(); diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index 7f305abe1f11244cd1957b397fd7aed009bcd387..1c1a2bc81e637f3627b3a8019c458421ab6e5b3c 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -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. */ diff --git a/src/plugins/coreplugin/icore.h b/src/plugins/coreplugin/icore.h index c0ff26c7f4e066ed787e7a2ad9b447b1be49bcce..ccc3b3b707c27b0bbd666f13076858ec49cf5590 100644 --- a/src/plugins/coreplugin/icore.h +++ b/src/plugins/coreplugin/icore.h @@ -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 diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 433c20a2c7c74179809244113e07e5e76612a3aa..1cb7e2f25f32296821f0b73d7ce618fe28cb079e 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -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() diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index 43321a66374c2d91ce5d07d192ad724cc0c5c952..fa55662b28e6fc305b9835fc96d1d26e720d8666 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -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()));