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>
This commit is contained in:
Eike Ziller
2015-09-22 09:17:59 +02:00
parent d46e5025e5
commit 972731d42e
4 changed files with 5 additions and 12 deletions

View File

@@ -279,10 +279,9 @@
*/ */
/*! /*!
\fn void ICore::contextChanged(Core::IContext *context, const Core::Context &additionalContexts) \fn void ICore::contextChanged(const Core::Context &context)
Indicates that a new \a context just became the current context Indicates that a new \a context just became the current context. This includes the context
(meaning that its widget got focus), or that the additional context ids from the focus object as well as the additional context.
specified by \a additionalContexts changed.
*/ */
#include "dialogs/newdialog.h" #include "dialogs/newdialog.h"

View File

@@ -136,7 +136,7 @@ signals:
void optionsDialogRequested(); void optionsDialogRequested();
void coreAboutToClose(); void coreAboutToClose();
void contextAboutToChange(const QList<Core::IContext *> &context); 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(); void themeChanged();
private: private:

View File

@@ -1024,7 +1024,7 @@ void MainWindow::updateContext()
} }
ActionManager::setContext(uniquecontexts); ActionManager::setContext(uniquecontexts);
emit m_coreImpl->contextChanged(m_activeContext, m_additionalContexts); emit m_coreImpl->contextChanged(uniquecontexts);
} }
void MainWindow::aboutToShowRecentFiles() void MainWindow::aboutToShowRecentFiles()

View File

@@ -203,12 +203,6 @@ void QmlDesignerPlugin::createDesignModeWidget()
this, this,
SLOT(onTextEditorsClosed(QList<Core::IEditor*>))); 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(), connect(Core::ModeManager::instance(),
SIGNAL(currentModeChanged(Core::IMode*,Core::IMode*)), SIGNAL(currentModeChanged(Core::IMode*,Core::IMode*)),
SLOT(onCurrentModeChanged(Core::IMode*,Core::IMode*))); SLOT(onCurrentModeChanged(Core::IMode*,Core::IMode*)));