#include "qmlcontextpane.h"
-#include <coreplugin/designmode.h>
#include <qmljseditor/qmljseditorconstants.h>
-#include <coreplugin/modemanager.h>
-#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
+#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
-#include <coreplugin/icore.h>
-#include <coreplugin/icontext.h>
+#include <coreplugin/coreconstants.h>
+#include <coreplugin/designmode.h>
#include <coreplugin/dialogs/iwizard.h>
-#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/editormanager/editormanager.h>
-#include <coreplugin/mimedatabase.h>
-#include <coreplugin/coreconstants.h>
-#include <coreplugin/uniqueidmanager.h>
+#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/editormanager/openeditorsmodel.h>
-#include <coreplugin/actionmanager/actionmanager.h>
+#include <coreplugin/icontext.h>
+#include <coreplugin/icore.h>
+#include <coreplugin/mimedatabase.h>
#include <coreplugin/modemanager.h>
+
#include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h>
{
Core::ICore *core = Core::ICore::instance();
- const int uid = core->uniqueIDManager()->uniqueIdentifier(QLatin1String(QmlDesigner::Constants::C_FORMEDITOR));
- const QList<int> context = QList<int>() << uid;
-
- const QList<int> switchContext = QList<int>() << uid
- << core->uniqueIDManager()->uniqueIdentifier(QmlJSEditor::Constants::C_QMLJSEDITOR_ID);
+ const Core::Context switchContext(QmlDesigner::Constants::C_FORMEDITOR,
+ QmlJSEditor::Constants::C_QMLJSEDITOR_ID);
Core::ActionManager *am = core->actionManager();
m_context = new DesignModeContext(m_mainWidget);
creatorCore->addContextObject(m_context);
- Core::UniqueIDManager *uuidManager = Core::UniqueIDManager::instance();
- QList<int> formEditorContext = QList<int> () << uuidManager->uniqueIdentifier(Constants::C_FORMEDITOR);
+ Core::Context formEditorContext(Constants::C_FORMEDITOR);
// Revert to saved
actionManager->registerAction(m_revertToSavedAction,
connect(m_editorManager, SIGNAL(editorsClosed(QList<Core::IEditor*>)),
this, SLOT(textEditorsClosed(QList<Core::IEditor*>)));
- connect(creatorCore, SIGNAL(contextChanged(Core::IContext*,QList<int>)),
- this, SLOT(contextChanged(Core::IContext*,QList<int>)));
+ connect(creatorCore, SIGNAL(contextChanged(Core::IContext*,Core::Context)),
+ this, SLOT(contextChanged(Core::IContext*,Core::Context)));
}
}
}
-void BauhausPlugin::contextChanged(Core::IContext *context, const QList<int> &additionalContexts)
+void BauhausPlugin::contextChanged(Core::IContext *context, const Core::Context &additionalContexts)
{
Q_UNUSED(context)
- foreach(int additionalContext, additionalContexts) {
+ foreach (int additionalContext, additionalContexts) {
if (m_context->context().contains(additionalContext)) {
m_isActive = true;
m_mainWidget->showEditor(m_editorManager->currentEditor());