Cancel code model indexing on project closing and full code model update

Task-Nr: QTCREATORBUG-1151
This commit is contained in:
dt
2010-04-22 18:57:43 +02:00
parent aa3ccee492
commit f093d0806b
6 changed files with 14 additions and 6 deletions

View File

@@ -85,6 +85,7 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
CMakeProject::~CMakeProject()
{
m_codeModelFuture.cancel();
delete m_rootNode;
}
@@ -257,7 +258,8 @@ bool CMakeProject::parseCMakeLists()
pinfo.defines = activeBC->toolChain()->predefinedMacros(); // TODO this is to simplistic
pinfo.frameworkPaths = allFrameworkPaths;
modelmanager->updateProjectInfo(pinfo);
modelmanager->updateSourceFiles(pinfo.sourceFiles);
m_codeModelFuture.cancel();
m_codeModelFuture = modelmanager->updateSourceFiles(pinfo.sourceFiles);
}
}

View File

@@ -132,6 +132,7 @@ private:
bool m_insideFileChanged;
QSet<QString> m_watchedFiles;
CMakeTargetFactory *m_targetFactory;
QFuture<void> m_codeModelFuture;
};
class CMakeCbpParser : public QXmlStreamReader