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

@@ -257,6 +257,7 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) :
Qt4Project::~Qt4Project()
{
m_codeModelFuture.cancel();
m_asyncUpdateState = ShuttingDown;
m_manager->unregisterProject(this);
delete m_projectFiles;
@@ -413,8 +414,6 @@ void Qt4Project::updateCodeModel()
if (debug)
qDebug()<<"Qt4Project::updateCodeModel()";
m_codeModelFuture.cancel();
if (!activeTarget() || !activeTarget()->activeBuildConfiguration())
return;
@@ -723,6 +722,9 @@ void Qt4Project::scheduleAsyncUpdate()
m_partialEvaluate.clear();
m_asyncUpdateState = AsyncFullUpdatePending;
m_asyncUpdateTimer.start();
// Cancel running code model update
m_codeModelFuture.cancel();
}