CMakePM: Do not mark targetless CMakeLists.txt files as generated

These files are not generated, but they were meant to be hidden.

It's better to restore the previous file system view of CMakeLists.txt,
until the project view receives a feature to mark files are hidden.

Fixes: QTCREATORBUG-32283
Fixes: QTCREATORBUG-32298
Change-Id: Ib1f41339f195eefd96151022c4919b7ac8127f6b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2025-01-08 12:39:12 +01:00
parent 3d79f74ea6
commit 01610a983a

View File

@@ -113,11 +113,6 @@ static CMakeFileResult extractCMakeFilesData(const QFuture<void> &cancelFuture,
auto node = std::make_unique<FileNode>(info.path, FileType::Project);
node->setIsGenerated(info.isGenerated);
// We will have the CMakeLists.txt file in the Target nodes as a child node.
// Except the root CMakeLists.txt file.
if (info.isCMakeListsDotTxt && info.path.parentDir() != sourceDirectory)
node->setIsGenerated(true);
if (info.isCMakeListsDotTxt) {
result.cmakeListNodes.emplace_back(std::move(node));
} else if (info.path.isChildOf(sourceDirectory)) {