forked from qt-creator/qt-creator
Core::Context: compile hot fix for Windows.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user