aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/generators
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-06-28 18:25:42 -0700
committerJake Petroules <jake.petroules@qt.io>2017-09-01 18:25:29 +0000
commit4202dfe7f4359634aeb0422da4b5f852ebf90985 (patch)
treefc8f143ef8ea3d2df1a171481fd2b9e98a5ddef8 /src/lib/corelib/generators
parent7eb98994dc9d95cf8d3d531804f84e2de090b4c0 (diff)
Generator data: add type and build directory methods
These will be used in a subsequent commit. Change-Id: I768a3b4fa01329b43e4c993b9b4bee7d3dfb3a34 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/generators')
-rw-r--r--src/lib/corelib/generators/generatordata.cpp16
-rw-r--r--src/lib/corelib/generators/generatordata.h2
2 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/corelib/generators/generatordata.cpp b/src/lib/corelib/generators/generatordata.cpp
index 37e4246fe..14f0a9f5f 100644
--- a/src/lib/corelib/generators/generatordata.cpp
+++ b/src/lib/corelib/generators/generatordata.cpp
@@ -66,6 +66,20 @@ QStringList GeneratableProductData::dependencies() const
"compatible with this generator."));
}
+QStringList GeneratableProductData::type() const
+{
+ return uniqueValue<QStringList>(&ProductData::type,
+ QLatin1String("Products with different types per configuration are not "
+ "compatible with this generator."));
+}
+
+QString GeneratableProductData::buildDirectory() const
+{
+ return uniqueValue<QString>(&ProductData::buildDirectory,
+ QLatin1String("GeneratableProductData::buildDirectory: "
+ "internal bug; this should not happen."));
+}
+
QString GeneratableProjectData::name() const
{
return uniqueValue<QString>(&ProjectData::name,
@@ -83,7 +97,7 @@ CodeLocation GeneratableProjectData::location() const
location = it.value().location();
if (oldLocation.isValid() && oldLocation != location)
throw ErrorInfo(QLatin1String("Projects with different code locations "
- "per-configuration are not compatible with this "
+ "per configuration are not compatible with this "
"generator."));
}
return location;
diff --git a/src/lib/corelib/generators/generatordata.h b/src/lib/corelib/generators/generatordata.h
index d8cf91c34..0db041507 100644
--- a/src/lib/corelib/generators/generatordata.h
+++ b/src/lib/corelib/generators/generatordata.h
@@ -76,6 +76,8 @@ struct QBS_EXPORT GeneratableProductData : public IMultiplexableContainer<Produc
QString name() const;
CodeLocation location() const;
QStringList dependencies() const;
+ QStringList type() const;
+ QString buildDirectory() const;
};
struct QBS_EXPORT GeneratableProjectData : public IMultiplexableContainer<ProjectData> {