Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1741

Add a Repeater construct

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • General
    • None

      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
              }
          }
      }
      

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kandeler Christian Kandeler
            ThiemoVanEngelen Thiemo van Engelen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes