forked from qt-creator/qt-creator
QbsProjectManager: Delete ProjectDocuments along with project
The documents have a reload callback that accesses the project. This would lead to a crash on a reload for a document belonging to a closed project. Change-Id: I171cacd0da347fb279609baaea4050ba1cc12008 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -158,6 +158,8 @@ QbsProject::~QbsProject()
|
|||||||
m_qbsUpdateFutureInterface = 0;
|
m_qbsUpdateFutureInterface = 0;
|
||||||
}
|
}
|
||||||
qDeleteAll(m_extraCompilers);
|
qDeleteAll(m_extraCompilers);
|
||||||
|
std::for_each(m_qbsDocuments.cbegin(), m_qbsDocuments.cend(),
|
||||||
|
[](Core::IDocument *doc) { doc->deleteLater(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
QbsRootProjectNode *QbsProject::rootProjectNode() const
|
QbsRootProjectNode *QbsProject::rootProjectNode() const
|
||||||
|
|||||||
Reference in New Issue
Block a user