diff options
author | dt <qtc-committer@nokia.com> | 2010-03-11 17:01:06 +0100 |
---|---|---|
committer | dt <qtc-committer@nokia.com> | 2010-03-11 17:02:36 +0100 |
commit | c06fcc005b3b47b69e76ed37907e74fe554109d5 (patch) | |
tree | 315be6cd8019749f4099c86b652a26edddf53411 /src/plugins/qt4projectmanager/qt4project.cpp | |
parent | af3b1ce77818b53fbe49e62488904b109edcf5fb (diff) | |
download | qt-creator-c06fcc005b3b47b69e76ed37907e74fe554109d5.tar.gz |
Fix crash for closing creator while evaluate is still in progress
Diffstat (limited to 'src/plugins/qt4projectmanager/qt4project.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/qt4project.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index e13c2da035..5b187c9865 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -248,8 +248,11 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) : Qt4Project::~Qt4Project() { + m_asyncUpdateState = ShuttingDown; m_manager->unregisterProject(this); delete m_projectFiles; + m_cancelEvaluate = true; + delete m_rootProjectNode; } void Qt4Project::updateFileList() @@ -729,17 +732,16 @@ void Qt4Project::decrementPendingEvaluateFutures() m_asyncUpdateFutureInterface = 0; m_cancelEvaluate = false; - // After beeing done, we need to call: - updateFileList(); - updateCodeModel(); - checkForNewApplicationProjects(); - checkForDeletedApplicationProjects(); - // TODO clear the profile cache ? if (m_asyncUpdateState == AsyncFullUpdatePending || m_asyncUpdateState == AsyncPartialUpdatePending) { qDebug()<<" Oh update is pending start the timer"; m_asyncUpdateTimer.start(); - } else { + } else if (m_asyncUpdateState != ShuttingDown){ + // After beeing done, we need to call: + updateFileList(); + updateCodeModel(); + checkForNewApplicationProjects(); + checkForDeletedApplicationProjects(); qDebug()<<" Setting state to Base"; m_asyncUpdateState = Base; } |