[Qt-creator] "Hide Generated Files" failed to hide generated files marked by cmake

Yik P. Cheung Pang.Cheung at harmonicinc.com
Wed Jul 26 13:26:28 CEST 2017


Hi,

This is on 4.3.1 in Projects view, without "Simplify Tree".  Although I am using CMake server mode, I think this issue affects other build systems as well, as you can see in the following tentative patch:

diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp
index 6faf601..0ad7c63 100644
--- a/src/plugins/projectexplorer/projectmodels.cpp
+++ b/src/plugins/projectexplorer/projectmodels.cpp
@@ -308,7 +308,7 @@ void FlatModel::addFolderNode(WrapperNode *parent, FolderNode *folderNode, QSet<
                 addFolderNode(parent, subFolderNode, seen);
             }
         } else if (FileNode *fileNode = node->asFileNode()) {
-            const bool isHidden = m_filterProjects && fileNode->isGenerated();
+            const bool isHidden = m_filterGeneratedFiles && fileNode->isGenerated();
             if (!isHidden && !seen->contains(fileNode)) {
                 seen->insert(fileNode);
                 parent->appendChild(new WrapperNode(fileNode));

Regards,
Pang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20170726/9c4520ec/attachment.html>


More information about the Qt-creator mailing list