Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
When building firmware, we often need to build a number of products from the same source with only small differences between them, for example using slightly different defines. Currently, as there is no multiplexing over arbitrary properties, this requires repeating a Product a number of times. It would be nice when this could be "automated" using a Repeater, much like how it can be done in qml. The model could be a simple index (which is used as index into an varList), but could also be a varList.
The project could look something like:
import "my_super_product.qbs" as MySuperProduct Project { property varList firmwareVariants: [ { name: "modelAB", feature_a: true, feature_b: true }, { name: "modelA", feature_a: true, feature_b: false }, { name: "modelB", feature_b: false, feature_b: true }, ] Repeater { model: firmwareVariants MySuperProduct { name: model.name has_feature_a: model.has_feature_a has_feature_b: model.has_feature_b } } }