aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/projectresolver.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-07-28 11:03:47 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-08-03 09:50:57 +0000
commitde14d18638b6aaf7c52847fec2e534f50c14b95d (patch)
tree5390e7258ba746e17ecf368e9bf94c45bb98ebcc /src/lib/corelib/language/projectresolver.cpp
parenta567ece42d055f09a77efe8b16ea1a269b404765 (diff)
Make it possible to add file tags to generated artifacts
To add another file tag to an application one can write Group { fileTagsFilter: ["application"] fileTags: ["my_additional_tag"] } [ChangeLog] It is now possible to add file tags to generated artifacts by setting the fileTags property in a Group that has a fileTagsFilter. Change-Id: Iac977011073defd532d82f015d93970e27a66ba3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/language/projectresolver.cpp')
-rw-r--r--src/lib/corelib/language/projectresolver.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/corelib/language/projectresolver.cpp b/src/lib/corelib/language/projectresolver.cpp
index a19ab8f3d..348b0af42 100644
--- a/src/lib/corelib/language/projectresolver.cpp
+++ b/src/lib/corelib/language/projectresolver.cpp
@@ -630,6 +630,9 @@ void ProjectResolver::resolveGroup(Item *item, ProjectContext *projectContext)
if (m_productContext->currentGroup)
isEnabled = isEnabled && m_productContext->currentGroup->enabled;
QStringList files = m_evaluator->stringListValue(item, QLatin1String("files"));
+ bool fileTagsSet;
+ const FileTags fileTags = m_evaluator->fileTagsValue(item, QLatin1String("fileTags"),
+ &fileTagsSet);
const QStringList fileTagsFilter
= m_evaluator->stringListValue(item, QLatin1String("fileTagsFilter"));
if (!fileTagsFilter.isEmpty()) {
@@ -654,6 +657,7 @@ void ProjectResolver::resolveGroup(Item *item, ProjectContext *projectContext)
return;
ArtifactPropertiesPtr aprops = ArtifactProperties::create();
aprops->setFileTagsFilter(FileTags::fromStringList(fileTagsFilter));
+ aprops->setExtraFileTags(fileTags);
aprops->setPropertyMapInternal(moduleProperties);
m_productContext->product->artifactProperties += aprops;
m_productContext->artifactPropertiesPerFilter.insert(fileTagsFilter,
@@ -674,8 +678,7 @@ void ProjectResolver::resolveGroup(Item *item, ProjectContext *projectContext)
group->location = item->location();
group->enabled = isEnabled;
group->properties = moduleProperties;
- bool fileTagsSet;
- group->fileTags = m_evaluator->fileTagsValue(item, QLatin1String("fileTags"), &fileTagsSet);
+ group->fileTags = fileTags;
group->overrideTags = m_evaluator->boolValue(item, QLatin1String("overrideTags"));
if (group->overrideTags && fileTagsSet) {
if (group->fileTags.isEmpty() )