ProjectExplorer: Use FilePaths in project tree nodes

Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-07-14 16:49:42 +02:00
parent a58686cf96
commit 1bde4ddbec
42 changed files with 343 additions and 308 deletions

View File

@@ -1470,18 +1470,17 @@ void QmakeBuildSystem::triggerParsing()
asyncUpdate();
}
QStringList QmakeBuildSystem::filesGeneratedFrom(const QString &input) const
FilePaths QmakeBuildSystem::filesGeneratedFrom(const FilePath &input) const
{
if (!project()->rootProjectNode())
return {};
if (const FileNode *file = fileNodeOf(project()->rootProjectNode(), FilePath::fromString(input))) {
if (const FileNode *file = fileNodeOf(project()->rootProjectNode(), input)) {
const QmakeProFileNode *pro = dynamic_cast<QmakeProFileNode *>(file->parentFolderNode());
QTC_ASSERT(pro, return {});
if (const QmakeProFile *proFile = pro->proFile())
return Utils::transform(proFile->generatedFiles(buildDir(pro->filePath()),
file->filePath(), file->fileType()),
&FilePath::toString);
return proFile->generatedFiles(buildDir(pro->filePath()),
file->filePath(), file->fileType());
}
return {};
}