Commit 9dd65691 authored by Tobias Hunger's avatar Tobias Hunger

Qbs: Fix memory leak in Qbs Project Manager

Make sure the root node of the project tree is actually deleted.

Change-Id: Idf32460d7b5d0518da9536084cccb074638cfce3
Reviewed-by: default avatarTobias Hunger <>
parent 5686f5fd
......@@ -114,6 +114,8 @@ QbsProject::QbsProject(QbsManager *manager, const QString &fileName) :
connect(&m_parsingDelay, SIGNAL(timeout()), this, SLOT(parseCurrentBuildConfiguration()));
updateDocuments(QSet<QString>() << fileName);
// NOTE: QbsProjectNode does not use this as a parent!
m_rootProjectNode = new QbsProjectNode(this); // needs documents to be initialized!
......@@ -125,6 +127,12 @@ QbsProject::~QbsProject()
delete m_qbsSetupProjectJob;
// Deleting the root node triggers a few things, make sure rootProjectNode
// returns 0 already
QbsProjectNode *root = m_rootProjectNode;
m_rootProjectNode = 0;
delete root;
QString QbsProject::displayName() const
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment