Merge remote-tracking branch 'origin/13.0'

Change-Id: I0892d8e54930bb5a65dc51117b8ca7d70ce300a3
This commit is contained in:
Eike Ziller
2024-04-17 12:48:28 +02:00
16 changed files with 130 additions and 66 deletions

View File

@@ -633,7 +633,7 @@ static FolderNode *createSourceGroupNode(const QString &sourceGroupName,
FolderNode *existingNode = currentNode->findChildFolderNode(
[&p](const FolderNode *fn) { return fn->displayName() == p; });
if (!existingNode) {
auto node = createCMakeVFolder(sourceDirectory, Node::DefaultFolderPriority + 5, p, true);
auto node = createCMakeVFolder(sourceDirectory, Node::DefaultFolderPriority + 5, p);
node->setListInProject(false);
node->setIcon([] { return Icon::fromTheme("edit-copy"); });
@@ -654,7 +654,6 @@ static void addCompileGroups(ProjectNode *targetRoot,
const FilePath &buildDirectory,
const TargetDetails &td)
{
const bool showSourceFolders = settings().showSourceSubFolders();
const bool inSourceBuild = (sourceDirectory == buildDirectory);
QSet<FilePath> alreadyListed;
@@ -685,6 +684,9 @@ static void addCompileGroups(ProjectNode *targetRoot,
if (isPchFile(buildDirectory, sourcePath) || isUnityFile(buildDirectory, sourcePath))
node->setIsGenerated(true);
const bool showSourceFolders = settings().showSourceSubFolders()
&& sourcesOrHeadersFolder(td.sourceGroups[si.sourceGroup]);
// Where does the file node need to go?
if (showSourceFolders && sourcePath.isChildOf(buildDirectory) && !inSourceBuild) {
buildFileNodes.emplace_back(std::move(node));
@@ -696,6 +698,9 @@ static void addCompileGroups(ProjectNode *targetRoot,
}
for (size_t i = 0; i < sourceGroupFileNodes.size(); ++i) {
const bool showSourceFolders = settings().showSourceSubFolders()
&& sourcesOrHeadersFolder(td.sourceGroups[i]);
std::vector<std::unique_ptr<FileNode>> &current = sourceGroupFileNodes[i];
FolderNode *insertNode = td.sourceGroups[i] == "TREE"
? targetRoot