summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-09-22 09:17:59 +0200
committerEike Ziller <eike.ziller@theqtcompany.com>2015-09-23 09:29:25 +0000
commit972731d42eabd25eae2c5fd027a8f1178c7f909c (patch)
treeb3190255bdc9e4119bac7f88ed4c0cc251087237
parentd46e5025e5ff43fc76b875165479d03de558bd81 (diff)
downloadqt-creator-972731d42eabd25eae2c5fd027a8f1178c7f909c.tar.gz
ICore: Don't split context in contextChanged signal
This way the order of the context doesn't get lost between context from the focus widget and additional contexts Change-Id: I371c411a5d9c9f31ae1f8631a6ede4eda100b0c5 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
-rw-r--r--src/plugins/coreplugin/icore.cpp7
-rw-r--r--src/plugins/coreplugin/icore.h2
-rw-r--r--src/plugins/coreplugin/mainwindow.cpp2
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.cpp6
4 files changed, 5 insertions, 12 deletions
diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp
index f295620f50..9fd605a6c5 100644
--- a/src/plugins/coreplugin/icore.cpp
+++ b/src/plugins/coreplugin/icore.cpp
@@ -279,10 +279,9 @@
*/
/*!
- \fn void ICore::contextChanged(Core::IContext *context, const Core::Context &additionalContexts)
- Indicates that a new \a context just became the current context
- (meaning that its widget got focus), or that the additional context ids
- specified by \a additionalContexts changed.
+ \fn void ICore::contextChanged(const Core::Context &context)
+ Indicates that a new \a context just became the current context. This includes the context
+ from the focus object as well as the additional context.
*/
#include "dialogs/newdialog.h"
diff --git a/src/plugins/coreplugin/icore.h b/src/plugins/coreplugin/icore.h
index a381a537fd..067e475f8d 100644
--- a/src/plugins/coreplugin/icore.h
+++ b/src/plugins/coreplugin/icore.h
@@ -136,7 +136,7 @@ signals:
void optionsDialogRequested();
void coreAboutToClose();
void contextAboutToChange(const QList<Core::IContext *> &context);
- void contextChanged(const QList<Core::IContext *> &context, const Core::Context &additionalContexts);
+ void contextChanged(const Core::Context &context);
void themeChanged();
private:
diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp
index 57026c1382..ddb32436e3 100644
--- a/src/plugins/coreplugin/mainwindow.cpp
+++ b/src/plugins/coreplugin/mainwindow.cpp
@@ -1024,7 +1024,7 @@ void MainWindow::updateContext()
}
ActionManager::setContext(uniquecontexts);
- emit m_coreImpl->contextChanged(m_activeContext, m_additionalContexts);
+ emit m_coreImpl->contextChanged(uniquecontexts);
}
void MainWindow::aboutToShowRecentFiles()
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp
index c8291b3886..448c838732 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.cpp
+++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp
@@ -203,12 +203,6 @@ void QmlDesignerPlugin::createDesignModeWidget()
this,
SLOT(onTextEditorsClosed(QList<Core::IEditor*>)));
-// connect(Core::ICore::editorManager(), SIGNAL(currentEditorChanged(Core::IEditor*)),
-// &data->documentManager, SLOT(currentTextEditorChanged(Core::IEditor*)));
-
-// connect(Core::ICore::instance(), SIGNAL(contextChanged(Core::IContext*,Core::Context)),
-// this, SLOT(contextChanged(Core::IContext*,Core::Context)));
-
connect(Core::ModeManager::instance(),
SIGNAL(currentModeChanged(Core::IMode*,Core::IMode*)),
SLOT(onCurrentModeChanged(Core::IMode*,Core::IMode*)));