[QBS] Get property from parent project

Tim Hutt tdhutt at gmail.com
Thu May 22 18:07:04 CEST 2014


And products presumably, because this also does not work:

Product {
   property string foo: "baz"
   Rule {
      prepare: {
          var a = product.foo;




On 22 May 2014 15:14, Christian Kandeler <christian.kandeler at digia.com>wrote:

> On 05/22/2014 04:00 PM, Tim Hutt wrote:
> > Relatedly, how can I access properties from a Rule's prepare script?
> > E.g. this does not work - it thinks foo is not defined.
> >
> >               Rule  {
> >
> >
> >                       property  string  foo:  "baz"
> >
> >
> >                       prepare:  {
> >
> >                               var  /a = foo;/
> >
> > /
> > /
>
> Yeah, Rules (much like Artifacts) are not first-class items in that they
> don't really support adding custom properties in a meaningful way (i.e.
> you can't access them later from prepare scripts). Maybe that is worth
> changing. Jörg, what's your opinion on this?
>
>
> Christian
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20140522/87be6127/attachment.html>


More information about the Qbs mailing list