Details
-
Bug
-
Resolution: Done
-
P2: Important
-
1.6.0
-
None
-
3925ddc6bfc99849836d427ba65e538370d2e047
Description
Consider a module m with these properties:
property string stringProp: "string prototype" property stringList listProp: ["list prototype"]
It could be used by some product like this:
Product { // ... Depends { name: "m" } m.listProp: ["product", m.stringProp] Group { files: ["test.txt"] } }
The value of m.listProp for both the product and the group is what we expect:
["product","string prototype","list prototype"]
The first value comes verbatim from the product, the second value comes from the product (evaluated in the context of the module prototype), and the third one comes from the module prototype (remember that list properties are auto-concatenated among module instances).
However, imagine that I now set one of the module properties in the group like this:
m.stringProp: "group"
My expectation as a user is that m.listProp in the group has the following value:
["product","group","list prototype"] // Expectation
However, it is the following:
["product","string prototype","list prototype","list prototype"] // Reality
Not only is the value we assigned to m.stringProp nowhere to be seen, but there is also an extra occurrence of the list prototype value.
In fact, assigning any property of any module has the same effect; e.g. replacing the assignment of m.stringProp with one to qbs.buildVariant gives us exactly the same value for the list property.
Attachments
Issue Links
- relates to
-
QBS-1005 Indirect module property assignments don't work from Group items
- Closed