diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2019-05-23 14:35:31 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-05-27 08:25:57 +0000 |
commit | e59bcd99624b858527bfb195a56f465fd2fe0b88 (patch) | |
tree | 5f8e9d7037174307f4d0b13780bfba610ea7637b /src/plugins/designer | |
parent | a8896693693e342899d5eb7103c189823a752b32 (diff) |
ProjectExplorer: Add a "product" tag to the ProjectNode class
A product is a project node from which a target binary is produced, such
as a Product item in qbs or a .pro file in qmake.
Change-Id: I6a0e6bed6c02684cb03b2b18fed6a1b493fa78b2
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/designer')
-rw-r--r-- | src/plugins/designer/resourcehandler.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/plugins/designer/resourcehandler.cpp b/src/plugins/designer/resourcehandler.cpp index c8a5003c8b6..73064f62bf0 100644 --- a/src/plugins/designer/resourcehandler.cpp +++ b/src/plugins/designer/resourcehandler.cpp @@ -104,17 +104,14 @@ void ResourceHandler::updateResourcesHelper(bool updateProjectResources) return n->filePath().toString() == fileName; }); if (fileNode) { - // Slightly hacky: - // The node types do not tell us whether we are dealing with a proper "product", - // e.g. a qbs product or qmake .pro file. We do *not* want qbs groups - // or qmake .pri files here, as they contain only a subset of the relevant - // files. Luckily, the "show in simplified tree" property appears to match - // exactly what we want here. + // We do not want qbs groups or qmake .pri files here, as they contain only a subset + // of the relevant files. do projectNode = fileNode->parentProjectNode(); - while (projectNode && !projectNode->showInSimpleTree()); + while (projectNode && !projectNode->isProduct()); } - QTC_ASSERT(projectNode, projectNode = project->rootProjectNode()); + if (!projectNode) + projectNode = project->rootProjectNode(); QStringList projectQrcFiles; projectNode->forEachNode([&](FileNode *node) { |