Fix header-display in cmake-server mode

Task-number: QTCREATORBUG-17760
Change-Id: If0873529a1ca83dfd27351fff9840484fca7b7fc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Florian Apolloner
2017-02-17 17:40:05 +01:00
committed by Tobias Hunger
parent eb0b0f9443
commit 39e8b3e355

View File

@@ -636,7 +636,7 @@ void ServerModeReader::addFileGroups(ProjectNode *targetRoot,
const FileNameList headerPaths = headers.keys();
for (const IncludePath *i : f->includePaths) {
for (const FileName &hp : headerPaths) {
if (hp != i->path && !hp.isChildOf(i->path))
if (hp != i->path && hp != sourceDirectory && !hp.isChildOf(i->path))
continue;
const QList<const FileNode *> &headerFiles = headers.value(hp);
const QList<const FileNode *> unseenHeaders = Utils::filtered(headerFiles, [&alreadyListed](const FileNode *fn) {