Commit 2f5f358f authored by hjk's avatar hjk

Core::Context: compile hot fix for Windows.

parent 2bdf10ce
......@@ -47,7 +47,6 @@
#include <coreplugin/icore.h>
#include <coreplugin/ifile.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/uniqueidmanager.h>
#include <extensionsystem/pluginmanager.h>
#include <find/ifindsupport.h>
#include <texteditor/fontsettings.h>
......@@ -291,11 +290,10 @@ class BinEditorInterface : public Core::IEditor
public:
BinEditorInterface(BinEditor *editor)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_editor = editor;
m_file = new BinEditorFile(m_editor);
m_context << uidm->uniqueIdentifier(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID);
m_context << uidm->uniqueIdentifier(Constants::C_BINEDITOR);
m_context.add(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID);
m_context.add(Constants::C_BINEDITOR);
m_cursorPositionLabel = new Utils::LineColumnLabel;
QHBoxLayout *l = new QHBoxLayout;
......@@ -436,8 +434,7 @@ void BinEditorPlugin::initializeEditor(BinEditor *editor)
QObject::connect(editor, SIGNAL(modificationChanged(bool)), editorInterface, SIGNAL(changed()));
editor->setEditorInterface(editorInterface);
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_context << uidm->uniqueIdentifier(Constants::C_BINEDITOR);
m_context.add(Constants::C_BINEDITOR);
if (!m_undoAction) {
m_undoAction = registerNewAction(QLatin1String(Core::Constants::UNDO),
this, SLOT(undoAction()),
......
......@@ -36,7 +36,6 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <texteditor/basetexteditor.h>
......@@ -298,9 +297,10 @@ void BookmarkView::gotoBookmark(const QModelIndex &index)
////
BookmarkContext::BookmarkContext(BookmarkView *widget)
: Core::IContext(widget), m_bookmarkView(widget)
: Core::IContext(widget),
m_bookmarkView(widget),
m_context(Constants::BOOKMARKS_CONTEXT)
{
m_context << UniqueIDManager::instance()->uniqueIdentifier(Constants::BOOKMARKS_CONTEXT);
}
Context BookmarkContext::context() const
......
......@@ -165,7 +165,7 @@ public:
virtual QWidget *widget();
private:
BookmarkView *m_bookmarkView;
Core::Context m_context;
const Core::Context m_context;
};
class BookmarkViewFactory : public Core::INavigationWidgetFactory
......
......@@ -35,7 +35,6 @@
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
......@@ -69,8 +68,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
{
Core::ICore *core = Core::ICore::instance();
Core::ActionManager *am = core->actionManager();
Core::UniqueIDManager *uidm = core->uniqueIDManager();
Core::Context textcontext(uidm->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR));
Core::Context textcontext(TextEditor::Constants::C_TEXTEDITOR);
Core::Context globalcontext(Core::Constants::C_GLOBAL_ID);
Core::ActionContainer *mtools =
......
......@@ -33,7 +33,6 @@
#include "cmakeeditorfactory.h"
#include "cmakeprojectconstants.h"
#include <coreplugin/uniqueidmanager.h>
#include <texteditor/fontsettings.h>
#include <texteditor/texteditoractionhandler.h>
#include <texteditor/texteditorconstants.h>
......@@ -49,12 +48,10 @@ using namespace CMakeProjectManager::Internal;
//
CMakeEditorEditable::CMakeEditorEditable(CMakeEditor *editor)
: BaseTextEditorEditable(editor)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_context << uidm->uniqueIdentifier(CMakeProjectManager::Constants::C_CMAKEEDITOR);
m_context << uidm->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
}
: BaseTextEditorEditable(editor),
m_context(CMakeProjectManager::Constants::C_CMAKEEDITOR,
TextEditor::Constants::C_TEXTEDITOR)
{ }
Core::Context CMakeEditorEditable::context() const
{
......
......@@ -60,7 +60,7 @@ public:
QString id() const;
bool isTemporary() const { return false; }
private:
Core::Context m_context;
const Core::Context m_context;
};
class CMakeEditor : public TextEditor::BaseTextEditor
......
......@@ -262,7 +262,7 @@ QList<ActionContainerPrivate *> ActionManagerPrivate::containers() const
bool ActionManagerPrivate::hasContext(int context) const
{
return m_context.contains(context);
return m_context.d.contains(context);
}
void ActionManagerPrivate::setContext(const Context &context)
......@@ -278,8 +278,8 @@ void ActionManagerPrivate::setContext(const Context &context)
bool ActionManagerPrivate::hasContext(const Context &context) const
{
for (int i = 0; i < m_context.count(); ++i) {
if (context.contains(m_context.at(i)))
for (int i = 0; i < m_context.d.count(); ++i) {
if (context.d.contains(m_context.d.at(i)))
return true;
}
return false;
......@@ -403,7 +403,7 @@ Command *ActionManagerPrivate::registerShortcut(QShortcut *shortcut, const QStri
shortcut->setParent(m_mainWnd);
sc->setShortcut(shortcut);
if (context.isEmpty())
if (context.d.isEmpty())
sc->setContext(Context(0));
else
sc->setContext(context);
......
......@@ -336,8 +336,8 @@ QString Shortcut::defaultText() const
bool Shortcut::setCurrentContext(const Core::Context &context)
{
foreach (int ctxt, m_context) {
if (context.contains(ctxt)) {
foreach (int ctxt, m_context.d) {
if (context.d.contains(ctxt)) {
if (!m_shortcut->isEnabled()) {
m_shortcut->setEnabled(true);
emit activeStateChanged();
......@@ -487,10 +487,10 @@ static inline QString msgActionWarning(QAction *newAction, int k, QAction *oldAc
void Action::addOverrideAction(QAction *action, const Core::Context &context)
{
if (context.isEmpty()) {
if (context.d.isEmpty()) {
m_contextActionMap.insert(0, action);
} else {
for (int i=0; i<context.size(); ++i) {
for (int i = 0; i < context.size(); ++i) {
int k = context.at(i);
if (m_contextActionMap.contains(k))
qWarning("%s", qPrintable(msgActionWarning(action, k, m_contextActionMap.value(k, 0))));
......
......@@ -31,7 +31,6 @@
#include <coreplugin/icore.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/openeditorsmodel.h>
#include <coreplugin/actionmanager/actionmanager.h>
......@@ -136,8 +135,7 @@ DesignMode::~DesignMode()
Context DesignMode::context() const
{
static Context contexts(
Core::UniqueIDManager::instance()->uniqueIdentifier(Constants::C_DESIGN_MODE));
static Context contexts(Constants::C_DESIGN_MODE);
return contexts;
}
......@@ -269,7 +267,7 @@ void DesignMode::updateContext(Core::IMode *newMode, Core::IMode *oldMode)
void DesignMode::setActiveContext(const Context &context)
{
if (d->m_activeContext == context)
if (d->m_activeContext.d == context.d)
return;
if (ModeManager::instance()->currentMode() == this)
......
......@@ -393,7 +393,7 @@ void ShortcutSettings::markPossibleCollisions(ShortcutItem *item)
continue;
}
foreach (int context, currentItem->m_cmd->context()) {
foreach (int context, currentItem->m_cmd->context().d) {
// conflict if context is identical, OR if one
// of the contexts is the global context
......
......@@ -117,10 +117,9 @@ QString EditMode::id() const
Context EditMode::context() const
{
static Context contexts(
UniqueIDManager::instance()->uniqueIdentifier(Constants::C_EDIT_MODE),
UniqueIDManager::instance()->uniqueIdentifier(Constants::C_EDITORMANAGER) ,
UniqueIDManager::instance()->uniqueIdentifier(Constants::C_NAVIGATION_PANE));
static Context contexts(Constants::C_EDIT_MODE,
Constants::C_EDITORMANAGER,
Constants::C_NAVIGATION_PANE);
return contexts;
}
......
......@@ -43,7 +43,6 @@
#include <coreplugin/editortoolbar.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
......@@ -267,15 +266,9 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
connect(m_d->m_core, SIGNAL(contextAboutToChange(Core::IContext *)),
this, SLOT(handleContextChange(Core::IContext *)));
UniqueIDManager *uidm = m_d->m_core->uniqueIDManager();
const Context gc = Context(Constants::C_GLOBAL_ID);
const Context editManagerContext =
Context(uidm->uniqueIdentifier(Constants::C_EDITORMANAGER));
const Context editManagerContext(Constants::C_EDITORMANAGER);
// combined context for edit & design modes
const Context editDesignContext =
Context(uidm->uniqueIdentifier(Constants::C_EDITORMANAGER),
uidm->uniqueIdentifier(Constants::C_DESIGN_MODE));
const Context editDesignContext(Constants::C_EDITORMANAGER, Constants::C_DESIGN_MODE);
ActionManager *am = m_d->m_core->actionManager();
ActionContainer *mfile = am->actionContainer(Constants::M_FILE);
......@@ -478,11 +471,7 @@ EditorManager::~EditorManager()
void EditorManager::init()
{
QList<int> context;
context << m_d->m_core->uniqueIDManager()->uniqueIdentifier("QtCreator.OpenDocumentsView");
m_d->m_coreListener = new EditorClosingCoreListener(this);
pluginManager()->addObject(m_d->m_coreListener);
m_d->m_openEditorsFactory = new OpenEditorsViewFactory();
......
......@@ -31,6 +31,8 @@
#define ICONTEXT_H
#include <coreplugin/core_global.h>
#include <QtCore/QList>
#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
......@@ -39,13 +41,23 @@ QT_END_NAMESPACE
namespace Core {
class CORE_EXPORT Context : public QList<int>
class CORE_EXPORT Context
{
public:
Context() {}
explicit Context(int c1) { append(c1); }
Context(int c1, int c2) { append(c1); append(c2); }
Context(int c1, int c2, int c3) { append(c1); append(c2); append(c3); }
explicit Context(const char *c1) { add(c1); }
Context(const char *c1, const char *c2) { add(c1); add(c2); }
Context(const char *c1, const char *c2, const char *c3) { add(c1); add(c2); add(c3); }
Context(const char *base, int offset);
void add(const char *c);
bool contains(const char *c) const;
bool contains(int c) const { return d.contains(c); }
int size() const { return d.size(); }
bool isEmpty() const { return d.isEmpty(); }
int at(int i) const { return d.at(i); }
public:
QList<int> d;
};
class CORE_EXPORT IContext : public QObject
......
......@@ -1198,21 +1198,21 @@ void MainWindow::writeSettings()
void MainWindow::updateAdditionalContexts(const Context &remove, const Context &add)
{
foreach (const int context, remove) {
foreach (const int context, remove.d) {
if (context == 0)
continue;
int index = m_additionalContexts.indexOf(context);
int index = m_additionalContexts.d.indexOf(context);
if (index != -1)
m_additionalContexts.removeAt(index);
m_additionalContexts.d.removeAt(index);
}
foreach (const int context, add) {
foreach (const int context, add.d) {
if (context == 0)
continue;
if (!m_additionalContexts.contains(context))
m_additionalContexts.prepend(context);
if (!m_additionalContexts.d.contains(context))
m_additionalContexts.d.prepend(context);
}
updateContext();
......@@ -1228,15 +1228,15 @@ void MainWindow::updateContext()
Context contexts;
if (m_activeContext)
contexts += m_activeContext->context();
contexts.d += m_activeContext->context().d;
contexts += m_additionalContexts;
contexts.d += m_additionalContexts.d;
Context uniquecontexts;
for (int i = 0; i < contexts.size(); ++i) {
const int c = contexts.at(i);
if (!uniquecontexts.contains(c))
uniquecontexts << c;
for (int i = 0; i < contexts.d.size(); ++i) {
const int c = contexts.d.at(i);
if (!uniquecontexts.d.contains(c))
uniquecontexts.d << c;
}
m_actionManager->setContext(uniquecontexts);
......
......@@ -34,7 +34,6 @@
#include "coreconstants.h"
#include "inavigationwidgetfactory.h"
#include "modemanager.h"
#include "uniqueidmanager.h"
#include "actionmanager/actionmanager.h"
#include "actionmanager/command.h"
......@@ -348,8 +347,7 @@ void NavigationWidget::objectAdded(QObject * obj)
ICore *core = ICore::instance();
ActionManager *am = core->actionManager();
Context navicontext(core->uniqueIDManager()->
uniqueIdentifier(Core::Constants::C_NAVIGATION_PANE));
Context navicontext(Core::Constants::C_NAVIGATION_PANE);
QString id = factory->id();
QShortcut *shortcut = new QShortcut(this);
......
......@@ -32,7 +32,7 @@
using namespace Core;
UniqueIDManager* UniqueIDManager::m_instance = 0;
UniqueIDManager *UniqueIDManager::m_instance = 0;
UniqueIDManager::UniqueIDManager()
{
......@@ -64,3 +64,27 @@ QString UniqueIDManager::stringForUniqueIdentifier(int uid)
{
return m_uniqueIdentifiers.key(uid);
}
// FIXME: Move to some better place.
#include "icontext.h"
static int toId(const char *id)
{
return UniqueIDManager::instance()->uniqueIdentifier(QLatin1String(id));
}
Context::Context(const char *id, int offset)
{
d.append(UniqueIDManager::instance()
-> uniqueIdentifier(QString(id) + QString::number(offset)));
}
void Context::add(const char *id)
{
d.append(toId(id));
}
bool Context::contains(const char *id) const
{
return d.contains(toId(id));
}
......@@ -47,7 +47,6 @@
#include <coreplugin/mimedatabase.h>
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <utils/qtcassert.h>
#include <texteditor/basetexteditor.h>
......@@ -83,7 +82,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m
Q_UNUSED(error_message)
// Create the globalcontext list to register actions accordingly
Core::Context globalcontext(UniqueIDManager::instance()->uniqueIdentifier(Core::Constants::C_GLOBAL));
Core::Context globalcontext(Core::Constants::C_GLOBAL);
// Create the settings Page
m_settings->fromSettings(Core::ICore::instance()->settings());
......
......@@ -61,7 +61,6 @@
#include <cpptools/cpptoolsconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/editormanager/ieditor.h>
......@@ -588,10 +587,9 @@ struct FindCanonicalSymbol
CPPEditorEditable::CPPEditorEditable(CPPEditor *editor)
: BaseTextEditorEditable(editor)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_context << uidm->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR);
m_context << uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
m_context << uidm->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
m_context.add(CppEditor::Constants::C_CPPEDITOR);
m_context.add(ProjectExplorer::Constants::LANG_CXX);
m_context.add(TextEditor::Constants::C_TEXTEDITOR);
}
CPPEditor::CPPEditor(QWidget *parent)
......
......@@ -231,7 +231,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
wizardParameters.setId(QLatin1String("C.Header"));
addAutoReleasedObject(new CppFileWizard(wizardParameters, Header, core));
Core::Context context(core->uniqueIDManager()->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR));
Core::Context context(CppEditor::Constants::C_CPPEDITOR);
Core::ActionManager *am = core->actionManager();
Core::ActionContainer *contextMenu= am->createMenu(CppEditor::Constants::M_CONTEXT);
......
......@@ -50,7 +50,6 @@
# include <projectexplorer/projectexplorerconstants.h>
# include <projectexplorer/session.h>
# include <coreplugin/icore.h>
# include <coreplugin/uniqueidmanager.h>
# include <coreplugin/mimedatabase.h>
# include <coreplugin/editormanager/editormanager.h>
# include <coreplugin/progressmanager/progressmanager.h>
......@@ -957,16 +956,18 @@ void CppModelManager::editorAboutToClose(Core::IEditor *editor)
bool CppModelManager::isCppEditor(Core::IEditor *editor) const
{
Core::UniqueIDManager *uidm = m_core->uniqueIDManager();
const int uid = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
return editor->context().contains(uid);
return editor->context().contains(ProjectExplorer::Constants::LANG_CXX);
}
TokenCache *CppModelManager::tokenCache(TextEditor::ITextEditor *editor) const
{ return editorSupport(editor)->tokenCache(); }
{
return editorSupport(editor)->tokenCache();
}
void CppModelManager::emitDocumentUpdated(Document::Ptr doc)
{ emit documentUpdated(doc); }
{
emit documentUpdated(doc);
}
void CppModelManager::onDocumentUpdated(Document::Ptr doc)
{
......
......@@ -43,7 +43,6 @@
#include <coreplugin/icore.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
......@@ -80,7 +79,6 @@ enum { debug = 0 };
CppToolsPlugin *CppToolsPlugin::m_instance = 0;
CppToolsPlugin::CppToolsPlugin() :
m_context(-1),
m_modelManager(0),
m_fileSettings(new CppFileSettings)
{
......@@ -131,8 +129,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
mtools->addMenu(mcpptools);
// Actions
m_context = core->uniqueIDManager()->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR);
Core::Context context(m_context);
Core::Context context(CppEditor::Constants::C_CPPEDITOR);
QAction *switchAction = new QAction(tr("Switch Header/Source"), this);
Core::Command *command = am->registerAction(switchAction, Constants::SWITCH_HEADER_SOURCE, context);
......
......@@ -76,7 +76,6 @@ private:
QString correspondingHeaderOrSourceI(const QString &fileName) const;
QFileInfo findFile(const QDir &dir, const QString &name, const ProjectExplorer::Project *project) const;
int m_context;
CppModelManager *m_modelManager;
QSharedPointer<CppFileSettings> m_fileSettings;
......
......@@ -48,7 +48,6 @@
#include <coreplugin/filemanager.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
......@@ -257,7 +256,7 @@ bool CVSPlugin::initialize(const QStringList & /*arguments */, QString *errorMes
toolsContainer->addMenu(cvsMenu);
m_menuAction = cvsMenu->menu()->menuAction();
Core::Context globalcontext(core->uniqueIDManager()->uniqueIdentifier(C_GLOBAL));
Core::Context globalcontext(C_GLOBAL);
Core::Command *command;
......@@ -379,8 +378,7 @@ bool CVSPlugin::initialize(const QStringList & /*arguments */, QString *errorMes
m_commandLocator->appendCommand(command);
// Actions of the submit editor
Core::Context cvscommitcontext;
cvscommitcontext << Core::UniqueIDManager::instance()->uniqueIdentifier(Constants::CVSCOMMITEDITOR);
Core::Context cvscommitcontext(Constants::CVSCOMMITEDITOR);
m_submitCurrentLogAction = new QAction(VCSBase::VCSBaseSubmitEditor::submitIcon(), tr("Commit"), this);
command = ami->registerAction(m_submitCurrentLogAction, Constants::SUBMIT_CURRENT, cvscommitcontext);
......
......@@ -82,7 +82,6 @@
#include <coreplugin/navigationwidget.h>
#include <coreplugin/outputpane.h>
#include <coreplugin/rightpane.h>
#include <coreplugin/uniqueidmanager.h>
#include <cplusplus/ExpressionUnderCursor.h>
#include <cplusplus/CppDocument.h>
......@@ -980,15 +979,12 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
ICore *core = ICore::instance();
QTC_ASSERT(core, return false);
Core::UniqueIDManager *uidm = core->uniqueIDManager();
QTC_ASSERT(uidm, return false);
Core::ActionManager *am = core->actionManager();
QTC_ASSERT(am, return false);
const Core::Context globalcontext(CC::C_GLOBAL_ID);
const Core::Context cppDebuggercontext(uidm->uniqueIdentifier(C_CPPDEBUGGER));
const Core::Context cppeditorcontext(uidm->uniqueIdentifier(CppEditor::Constants::C_CPPEDITOR));
const Core::Context cppDebuggercontext(C_CPPDEBUGGER);
const Core::Context cppeditorcontext(CppEditor::Constants::C_CPPEDITOR);
m_stopIcon = QIcon(_(":/debugger/images/debugger_stop_small.png"));
m_stopIcon.addFile(":/debugger/images/debugger_stop.png");
......@@ -1206,17 +1202,15 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
errorMessage->clear();
}
m_gdbRunningContext = Core::Context(uidm->uniqueIdentifier(Constants::GDBRUNNING));
m_gdbRunningContext = Core::Context(Constants::GDBRUNNING);
// Register factory of DebuggerRunControl.
m_debuggerRunControlFactory = new DebuggerRunControlFactory
(m_plugin, DebuggerEngineType(cmdLineEnabledEngines));
m_plugin->addAutoReleasedObject(m_debuggerRunControlFactory);
m_debugMode->setContext(Core::Context(
uidm->uniqueIdentifier(CC::C_EDITORMANAGER),
uidm->uniqueIdentifier(C_DEBUGMODE),
uidm->uniqueIdentifier(CC::C_NAVIGATION_PANE)));
m_debugMode->setContext(
Core::Context(CC::C_EDITORMANAGER, C_DEBUGMODE, CC::C_NAVIGATION_PANE));
m_reverseToolButton = 0;
......
......@@ -42,7 +42,6 @@
#include <coreplugin/modemanager.h>
#include <coreplugin/basemode.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
......@@ -140,7 +139,7 @@ DebuggerUISwitcher::DebuggerUISwitcher(Core::BaseMode *mode, QObject* parent) :
d->m_languageActionGroup->setExclusive(true);
d->m_globalContext << Core::Constants::C_GLOBAL_ID;
d->m_globalContext.add(Core::Constants::C_GLOBAL_ID);