QmlDesigner: Improve ownership of QmlProjectItem

Change-Id: Ibfe4b0b5314dada85a601a8f27003af135df78f1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2022-04-13 11:47:32 +02:00
committed by Tim Jenssen
parent 118d9d43d2
commit f51162a3fe
6 changed files with 26 additions and 43 deletions

View File

@@ -191,8 +191,7 @@ void QmlBuildSystem::parseProject(RefreshOptions options)
m_projectItem.reset();
if (!m_projectItem) {
QString errorMessage;
m_projectItem.reset(
QmlProjectFileFormat::parseProjectFile(projectFilePath(), &errorMessage));
m_projectItem = QmlProjectFileFormat::parseProjectFile(projectFilePath(), &errorMessage);
if (m_projectItem) {
connect(m_projectItem.get(),
&QmlProjectItem::qmlFilesChanged,