Commit dd097879 authored by dt's avatar dt

Also make ProjectLanguage a proper context

parent 08010472
......@@ -52,9 +52,8 @@ using namespace CMakeProjectManager::Internal;
CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage)
: m_settingsPage(cmakeSettingsPage)
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_projectContext = Core::Context(CMakeProjectManager::Constants::PROJECTCONTEXT);
m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
m_projectLanguage = Core::Context(ProjectExplorer::Constants::LANG_CXX);
}
Core::Context CMakeManager::projectContext() const
......@@ -62,7 +61,7 @@ Core::Context CMakeManager::projectContext() const
return m_projectContext;
}
int CMakeManager::projectLanguage() const
Core::Context CMakeManager::projectLanguage() const
{
return m_projectLanguage;
}
......
......@@ -53,7 +53,7 @@ public:
CMakeManager(CMakeSettingsPage *cmakeSettingsPage);
virtual Core::Context projectContext() const;
virtual int projectLanguage() const;
virtual Core::Context projectLanguage() const;
virtual ProjectExplorer::Project *openProject(const QString &fileName);
virtual QString mimeType() const;
......@@ -77,7 +77,7 @@ private:
static QString qtVersionForQMake(const QString &qmakePath);
static QPair<QString, QString> findQtDir(const ProjectExplorer::Environment &env);
Core::Context m_projectContext;
int m_projectLanguage;
Core::Context m_projectLanguage;
CMakeSettingsPage *m_settingsPage;
};
......
......@@ -33,7 +33,6 @@
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/uniqueidmanager.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/session.h>
......@@ -44,9 +43,8 @@ using namespace GenericProjectManager::Internal;
Manager::Manager()
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_projectContext = Core::Context(GenericProjectManager::Constants::PROJECTCONTEXT);
m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX);
m_projectLanguage = Core::Context(ProjectExplorer::Constants::LANG_CXX);
}
Manager::~Manager()
......@@ -55,7 +53,7 @@ Manager::~Manager()
Core::Context Manager::projectContext() const
{ return m_projectContext; }
int Manager::projectLanguage() const
Core::Context Manager::projectLanguage() const
{ return m_projectLanguage; }
QString Manager::mimeType() const
......
......@@ -46,7 +46,7 @@ public:
virtual ~Manager();
virtual Core::Context projectContext() const;
virtual int projectLanguage() const;
virtual Core::Context projectLanguage() const;
virtual QString mimeType() const;
virtual ProjectExplorer::Project *openProject(const QString &fileName);
......@@ -58,7 +58,7 @@ public:
private:
Core::Context m_projectContext;
int m_projectLanguage;
Core::Context m_projectLanguage;
QList<GenericProject *> m_projects;
};
......
......@@ -48,7 +48,7 @@ public:
IProjectManager() {}
virtual Core::Context projectContext() const = 0; //TODO move into project
virtual int projectLanguage() const = 0; //TODO move into project
virtual Core::Context projectLanguage() const = 0; //TODO move into project
virtual QString mimeType() const = 0;
virtual Project *openProject(const QString &fileName) = 0;
......
......@@ -34,7 +34,6 @@
#include <coreplugin/icore.h>
#include <coreplugin/ifile.h>
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/messagemanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorer.h>
......@@ -47,9 +46,8 @@ namespace Internal {
Manager::Manager()
{
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
m_projectContext = Core::Context(QmlProjectManager::Constants::PROJECTCONTEXT);
m_projectLanguage = uidm->uniqueIdentifier(QmlProjectManager::Constants::LANG_QML);
m_projectLanguage = Core::Context(QmlProjectManager::Constants::LANG_QML);
}
Manager::~Manager()
......@@ -58,7 +56,7 @@ Manager::~Manager()
Core::Context Manager::projectContext() const
{ return m_projectContext; }
int Manager::projectLanguage() const
Core::Context Manager::projectLanguage() const
{ return m_projectLanguage; }
QString Manager::mimeType() const
......
......@@ -47,7 +47,7 @@ public:
virtual ~Manager();
virtual Core::Context projectContext() const;
virtual int projectLanguage() const;
virtual Core::Context projectLanguage() const;
virtual QString mimeType() const;
virtual ProjectExplorer::Project *openProject(const QString &fileName);
......@@ -59,7 +59,7 @@ public:
private:
Core::Context m_projectContext;
int m_projectLanguage;
Core::Context m_projectLanguage;
QList<QmlProject *> m_projects;
};
......
......@@ -170,10 +170,9 @@ Core::Context Qt4Manager::projectContext() const
return m_plugin->projectContext();
}
int Qt4Manager::projectLanguage() const
Core::Context Qt4Manager::projectLanguage() const
{
return Core::UniqueIDManager::instance()->
uniqueIdentifier(QLatin1String(ProjectExplorer::Constants::LANG_CXX));
return Core::Context(ProjectExplorer::Constants::LANG_CXX);
}
QString Qt4Manager::mimeType() const
......
......@@ -76,7 +76,7 @@ public:
// ProjectExplorer::IProjectManager
Core::Context projectContext() const;
int projectLanguage() const;
Core::Context projectLanguage() const;
virtual QString mimeType() const;
ProjectExplorer::Project *openProject(const QString &fileName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment