Protected m_dirty and m_projects with a mutex.

This commit is contained in:
Roberto Raggi
2008-12-08 10:44:56 +01:00
parent 44cc9a2b40
commit d74ddb76b6
5 changed files with 111 additions and 40 deletions

View File

@@ -480,23 +480,27 @@ void Qt4Project::updateCodeModel()
files += m_projectFiles->files[SourceType];
files += m_projectFiles->generatedFiles[SourceType];
CppTools::CppModelManagerInterface::ProjectInfo *pinfo = modelmanager->projectInfo(this);
CppTools::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this);
if (pinfo->defines == predefinedMacros &&
pinfo->includePaths == allIncludePaths &&
pinfo->frameworkPaths == allFrameworkPaths &&
pinfo->sourceFiles == files) {
// Nothing to update...
if (pinfo.defines == predefinedMacros &&
pinfo.includePaths == allIncludePaths &&
pinfo.frameworkPaths == allFrameworkPaths &&
pinfo.sourceFiles == files) {
modelmanager->updateProjectInfo(pinfo);
} else {
pinfo->defines = predefinedMacros;
pinfo.defines = predefinedMacros;
// pinfo->defines += definedMacros; // ### FIXME: me
pinfo->includePaths = allIncludePaths;
pinfo->frameworkPaths = allFrameworkPaths;
pinfo->sourceFiles = files;
pinfo.includePaths = allIncludePaths;
pinfo.frameworkPaths = allFrameworkPaths;
pinfo.sourceFiles = files;
modelmanager->updateProjectInfo(pinfo);
modelmanager->GC();
modelmanager->updateSourceFiles(pinfo->sourceFiles);
modelmanager->updateSourceFiles(pinfo.sourceFiles);
}
// update info
}