QbsProject: Use deleteLater to free QObjects

Change-Id: I33af237b271f32adc606befef081b97ded5e67ff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Tobias Hunger
2017-05-09 12:18:34 +02:00
parent 3282f85f3d
commit 2b4715c208

View File

@@ -715,7 +715,7 @@ void QbsProject::updateDocuments(const QSet<QString> &files)
foreach (IDocument *doc, currentDocuments) { foreach (IDocument *doc, currentDocuments) {
if (filesToRemove.contains(doc->filePath().toString())) { if (filesToRemove.contains(doc->filePath().toString())) {
m_qbsDocuments.remove(doc); m_qbsDocuments.remove(doc);
delete doc; doc->deleteLater();
} }
} }
QSet<IDocument *> toAdd; QSet<IDocument *> toAdd;