forked from qt-creator/qt-creator
QbsProjectManager: Don't leak the "Reading project" progress bar.
If a qbs project gets closed (e.g. due to a session switch) while the project is being loaded, the corresponding QFuture does not get deleted and the progress bar will be around forever. This patch fixes that. Note: The project resolving by qbs was already correctly canceled; this is about the visual effect only. Change-Id: If00aed949505088cfdb87d08e26f3b62ccea5fd1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
@@ -131,6 +131,11 @@ QbsProject::~QbsProject()
|
||||
{
|
||||
m_codeModelFuture.cancel();
|
||||
delete m_qbsProjectParser;
|
||||
if (m_qbsUpdateFutureInterface) {
|
||||
m_qbsUpdateFutureInterface->reportCanceled();
|
||||
delete m_qbsUpdateFutureInterface;
|
||||
m_qbsUpdateFutureInterface = 0;
|
||||
}
|
||||
|
||||
// Deleting the root node triggers a few things, make sure rootProjectNode
|
||||
// returns 0 already
|
||||
|
Reference in New Issue
Block a user