Use project id uniformly as project context

The possibly intented flexibility e.g. to have different project types
share the same idea of a common context was never used, in all cases
we had a 1:1 relation ship between project ids and ids that were used
as context. This led to oversights like the one fixed in 60fb35a2.

This patch here uses the project id unconditionally as context and
drops all context ids. If we'll ever have the situation where the
original flexibility was needed, Project::projectContext() could be
made virtual and overridden were needed.

Also, the context was never modified for any given project, so the
updating machinery is not needed.

Change-Id: I3f7fac0ed5e4704e126558987c48577f26082dfd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2017-12-20 11:13:26 +01:00
parent bc4efa662c
commit b2a16190e8
20 changed files with 6 additions and 36 deletions

View File

@@ -59,7 +59,6 @@ QmlProject::QmlProject(const Utils::FileName &fileName) :
[this]() { refreshProjectFile(); })
{
setId(QmlProjectManager::Constants::QML_PROJECT_ID);
setProjectContext(Context(QmlProjectManager::Constants::PROJECTCONTEXT));
setProjectLanguages(Context(ProjectExplorer::Constants::QMLJS_LANGUAGE_ID));
setDisplayName(fileName.toFileInfo().completeBaseName());
}