Commit 4cfaeb8b authored by Christian Kandeler's avatar Christian Kandeler

QbsProjectManager: Fix crash when calling QbsProject::files().

We can't do that during parsing, as qbs::Project::buildSystemFiles()
might run into a race condition.

Change-Id: Iae3fd3000fdc71fec50c82d50fb3b4e3888351bc
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
parent 165f759e
......@@ -190,11 +190,11 @@ static void collectFilesForProject(const qbs::ProjectData &project, QSet<QString
QStringList QbsProject::files(Project::FilesMode fileMode) const
{
Q_UNUSED(fileMode);
if (!m_rootProjectNode || !m_rootProjectNode->qbsProjectData().isValid())
if (!m_qbsProject.isValid() || isParsing())
return QStringList();
QSet<QString> result;
collectFilesForProject(m_rootProjectNode->qbsProjectData(), result);
result.unite(qbsProject().buildSystemFiles());
collectFilesForProject(m_projectData, result);
result.unite(m_qbsProject.buildSystemFiles());
return result.toList();
}
......
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