logic: only return existing paths in indexed header path detection of CDB, CBP and Sonargraph sourcegroups

This commit is contained in:
mlangkabel
2018-06-15 18:53:50 +02:00
parent bbf462d1fb
commit 24c0f86eda
@@ -289,7 +289,17 @@ std::vector<FilePath> QtProjectWizzardContentIndexedHeaderPaths::getIndexedPaths
LOG_WARNING("Unable to fetch indexed header paths. The provided Sonargraph project path does not exist.");
}
}
return utility::getTopLevelPaths(indexedHeaderPaths);
std::vector<FilePath> topLevelPaths;
for (const FilePath& path : utility::getTopLevelPaths(indexedHeaderPaths))
{
if (path.exists())
{
topLevelPaths.push_back(path);
}
}
return topLevelPaths;
}
std::vector<FilePath> QtProjectWizzardContentIndexedHeaderPaths::getIndexedPathsDerivedFromCodeblocksProject(
@@ -319,7 +329,17 @@ std::vector<FilePath> QtProjectWizzardContentIndexedHeaderPaths::getIndexedPaths
LOG_WARNING("Unable to fetch indexed header paths. The provided Sonargraph project path does not exist.");
}
}
return utility::getTopLevelPaths(indexedHeaderPaths);
std::vector<FilePath> topLevelPaths;
for (const FilePath& path : utility::getTopLevelPaths(indexedHeaderPaths))
{
if (path.exists())
{
topLevelPaths.push_back(path);
}
}
return topLevelPaths;
}
std::vector<FilePath> QtProjectWizzardContentIndexedHeaderPaths::getIndexedPathsDerivedFromCDB(
@@ -348,7 +368,16 @@ std::vector<FilePath> QtProjectWizzardContentIndexedHeaderPaths::getIndexedPaths
}
}
return utility::getTopLevelPaths(indexedHeaderPaths);
std::vector<FilePath> topLevelPaths;
for (const FilePath& path : utility::getTopLevelPaths(indexedHeaderPaths))
{
if (path.exists())
{
topLevelPaths.push_back(path);
}
}
return topLevelPaths;
}
QtProjectWizzardContentIndexedHeaderPaths::QtProjectWizzardContentIndexedHeaderPaths(