forked from qt-creator/qt-creator
qmake: fix missing OTHER_FILES in project tree
... in subdirs projects which actually have any subdirs. that would happen via this mechanism in QmakeProFileNode::evaluate(): first, IncludedPriFile nodes with proFile = null are created for the subdirs. subsequently, this tree is enriched by transforming the reader's included files. that loop iterates over all already created nodes and tries to match them against included files. at nesting level one, this would now run into the nodes created for the subdirs. the code failed to skip over these nodes, and would thus create a bogus node for the .pro file (as it has the parent null in the mapping of included files). this node would not be included into the tree due to the loop prevention in QmakeProFileNode::applyEvaluate() (it obviously had the same file path as its parent), but at the same time it would catch the files meant for the root node due to defeating the fallback in QmakePriFileNode::extractSources(). Task-number: QTCREATORBUG-17473 Change-Id: Ice9f667345148be42297cc21ff0a73058f27cc38 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Oswald Buddenhagen
parent
1e73c52dd5
commit
624339ea70
@@ -1848,6 +1848,8 @@ EvalResult *QmakeProFileNode::evaluate(const EvalInput &input)
|
||||
QList<IncludedPriFile *> toBuild = { &result->includedFiles };
|
||||
while (!toBuild.isEmpty()) {
|
||||
IncludedPriFile *current = toBuild.takeFirst();
|
||||
if (!current->proFile)
|
||||
continue; // Don't attempt to map subdirs here
|
||||
QVector<ProFile *> children = includeFiles.value(current->proFile);
|
||||
foreach (ProFile *child, children) {
|
||||
const Utils::FileName childName = Utils::FileName::fromString(child->fileName());
|
||||
@@ -1882,6 +1884,8 @@ EvalResult *QmakeProFileNode::evaluate(const EvalInput &input)
|
||||
QList<IncludedPriFile *> toBuild = { &result->includedFiles };
|
||||
while (!toBuild.isEmpty()) {
|
||||
IncludedPriFile *current = toBuild.takeFirst();
|
||||
if (!current->proFile)
|
||||
continue; // Don't attempt to map subdirs here
|
||||
QVector<ProFile *> children = includeFiles.value(current->proFile);
|
||||
foreach (ProFile *child, children) {
|
||||
const Utils::FileName childName = Utils::FileName::fromString(child->fileName());
|
||||
|
Reference in New Issue
Block a user