CppTools: Create ProjectInfos explicitly

...instead of going through CppModelManager::projectInfo().

Now CppModelManager::projectInfo() returns an invalid ProjectInfo in
case there is no valid data for the given Project.

Change-Id: I11908bf2ddf865b1d3d71ff176eaf4139292b21c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2014-11-20 12:50:37 +01:00
committed by Erik Verbruggen
parent be7d63c99a
commit 205170a9e5
9 changed files with 25 additions and 51 deletions

View File

@@ -493,8 +493,8 @@ void QmakeProject::updateCppCodeModel()
FindQmakeProFiles findQmakeProFiles;
QList<QmakeProFileNode *> proFiles = findQmakeProFiles(rootProjectNode());
CppTools::ProjectInfo pinfo = modelmanager->projectInfo(this);
pinfo.clearProjectParts();
CppTools::ProjectInfo pinfo = CppTools::ProjectInfo(this);
ProjectPart::QtVersion qtVersionForPart = ProjectPart::NoQt;
if (qtVersion) {
if (qtVersion->qtVersion() < QtSupport::QtVersionNumber(5,0,0))