Commit bc390a8e authored by Tobias Hunger's avatar Tobias Hunger Committed by Tim Jenssen

qmake: Do not use out-parameters for QmakeProject::findProFile

Change-Id: I9eec5138ebe0d3c02dadb91c66146e4419fc9cd3
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent 8eb63d83
......@@ -956,21 +956,24 @@ bool QmakeProject::hasSubNode(QmakePriFileNode *root, const FileName &path)
return false;
}
void QmakeProject::findProFile(const FileName &fileName, QmakeProFileNode *root, QList<QmakeProFileNode *> &list)
QList<QmakeProFileNode *> QmakeProject::findProFile(const FileName &fileName, QmakeProFileNode *root)
{
QList<QmakeProFileNode *> result;
if (hasSubNode(root, fileName))
list.append(root);
result.append(root);
foreach (FolderNode *fn, root->folderNodes())
foreach (FolderNode *fn, root->folderNodes()) {
if (QmakeProFileNode *qt4proFileNode = dynamic_cast<QmakeProFileNode *>(fn))
findProFile(fileName, qt4proFileNode, list);
result.append(findProFile(fileName, qt4proFileNode));
}
return result;
}
void QmakeProject::notifyChanged(const FileName &name)
{
if (files(QmakeProject::SourceFiles).contains(name.toString())) {
QList<QmakeProFileNode *> list;
findProFile(name, rootProjectNode(), list);
const QList<QmakeProFileNode *> list = findProFile(name, rootProjectNode());
foreach (QmakeProFileNode *node, list) {
QtSupport::ProFileCacheManager::instance()->discardFile(name.toString());
node->scheduleUpdate(QmakeProFile::ParseNow);
......
......@@ -165,7 +165,7 @@ private:
static void collectAllProFiles(QList<QmakeProFileNode *> &list, QmakeProFileNode *node, Parsing parse,
const QList<ProjectType> &projectTypes);
static void findProFile(const Utils::FileName &fileName, QmakeProFileNode *root, QList<QmakeProFileNode *> &list);
static QList<QmakeProFileNode *> findProFile(const Utils::FileName &fileName, QmakeProFileNode *root);
static bool hasSubNode(QmakePriFileNode *root, const Utils::FileName &path);
static bool equalFileList(const QStringList &a, const QStringList &b);
......
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