aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-03-31 14:52:18 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-03-31 16:04:51 +0200
commita40ce9ece006fa5748ead5879dfa41336337efe5 (patch)
tree8517f8bbafc4e855c1a5f2d320cffcf44336caf3
parenta3e53e5ea4d6ae328bfa58e398ff02cb791b37ad (diff)
Do not report an error for a non-existing file in a disabled group.
Task-number: QBS-470 Change-Id: I839c5778bbc37ffb907315487bd1a072ba9f1791 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--src/lib/corelib/language/projectresolver.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/corelib/language/projectresolver.cpp b/src/lib/corelib/language/projectresolver.cpp
index 47c62318c..fec042e1e 100644
--- a/src/lib/corelib/language/projectresolver.cpp
+++ b/src/lib/corelib/language/projectresolver.cpp
@@ -512,15 +512,17 @@ void ProjectResolver::resolveGroup(Item *item, ProjectContext *projectContext)
createSourceArtifact(m_productContext->product, moduleProperties, fileName,
group->fileTags, group->overrideTags, group->files);
ErrorInfo fileError;
- foreach (const SourceArtifactConstPtr &a, group->files) {
- if (!FileInfo(a->absoluteFilePath).exists()) {
- fileError.append(Tr::tr("File '%1' does not exist.")
- .arg(a->absoluteFilePath),
- item->property(QLatin1String("files"))->location());
+ if (group->enabled) {
+ foreach (const SourceArtifactConstPtr &a, group->files) {
+ if (!FileInfo(a->absoluteFilePath).exists()) {
+ fileError.append(Tr::tr("File '%1' does not exist.")
+ .arg(a->absoluteFilePath),
+ item->property(QLatin1String("files"))->location());
+ }
}
+ if (fileError.hasError())
+ throw ErrorInfo(fileError);
}
- if (fileError.hasError())
- throw ErrorInfo(fileError);
group->name = m_evaluator->stringValue(item, QLatin1String("name"));
if (group->name.isEmpty())