forked from qt-creator/qt-creator
Cancel code model indexing on project closing and full code model update
Task-Nr: QTCREATORBUG-1151
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ private:
|
||||
bool m_insideFileChanged;
|
||||
QSet<QString> m_watchedFiles;
|
||||
CMakeTargetFactory *m_targetFactory;
|
||||
QFuture<void> m_codeModelFuture;
|
||||
};
|
||||
|
||||
class CMakeCbpParser : public QXmlStreamReader
|
||||
|
||||
Reference in New Issue
Block a user