Re: [QBS] Get property from parent project

2014-05-24 Thread olivier musse
On 05/22/2014 04:19 PM, olivier musse wrote: Property inheritance is really nice and simple. Thanks for this important information. I have succeed to verify it, but then have another question : How can I detect in the sub project if the property is already set at an higher level project.

Re: [QBS] Get property from parent project

2014-05-23 Thread Christian Kandeler
On 05/22/2014 06:07 PM, Tim Hutt wrote: Product { property string foo: baz Rule { prepare: { var a = product.foo; Sure it does. We use that all the time. Try again ;) Here is a full example that I just tested: $ cat project.qbs import qbs Product { type:

Re: [QBS] Get property from parent project

2014-05-23 Thread Tim Hutt
Ah it seems to work now, weird. I may have typo'd project instead of product. Also, good news! I have found a reliable way to trigger the qbs-isn't-updated bug: 1. Create a new C++ QBS project in QtCreator. 2. Rename main.cpp to foo.txt 3. Paste this in the QBS file: import qbs Product { type:

Re: [QBS] Get property from parent project

2014-05-23 Thread Joerg Bornemann
On 22-May-14 16:14, Christian Kandeler 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

Re: [QBS] Get property from parent project

2014-05-23 Thread Christian Kandeler
On 05/23/2014 11:05 AM, Tim Hutt wrote: I have found a reliable way to trigger the qbs-isn't-updated bug: 1. Create a new C++ QBS project in QtCreator. 2. Rename main.cpp to foo.txt 3. Paste this in the QBS file: import qbs Product { type: foo Group { files: foo.txt fileTags:

Re: [QBS] Get property from parent project

2014-05-22 Thread Christian Kandeler
On 05/22/2014 01:26 PM, olivier musse wrote: I have a project with subproject and so on. When in a product or a subproject, how to access parent project properties. Sometimes it seems to be project.MyProperty, sometimes MyProperty Is there any documentation to clarify this point? Simple:

Re: [QBS] Get property from parent project

2014-05-22 Thread Tim Hutt
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;* On 22

Re: [QBS] Get property from parent project

2014-05-22 Thread Christian Kandeler
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: {

Re: [QBS] Get property from parent project

2014-05-22 Thread olivier musse
Christian, The bug I was talking about (project prefix) is in a Rule artifact. I do something like (separated in multiple files but the same hierarchy) Project{ property string myProp:val Project{ Product{ Rule{ inputs:['myinputs'] Artifact {

Re: [QBS] Get property from parent project

2014-05-22 Thread Christian Kandeler
On 05/22/2014 04:19 PM, olivier musse wrote: Property inheritance is really nice and simple. Thanks for this important information. I have succeed to verify it, but then have another question : How can I detect in the sub project if the property is already set at an higher level project.

Re: [QBS] Get property from parent project

2014-05-22 Thread Christian Kandeler
On 05/22/2014 04:35 PM, olivier musse wrote: Christian, The bug I was talking about (project prefix) is in a Rule artifact. I do something like (separated in multiple files but the same hierarchy) Project{ property string myProp:val Project{ Product{ Rule{

Re: [QBS] Get property from parent project

2014-05-22 Thread Yuchen Deng
I can reproduce this issue in many case. it's often happen. 2014-05-22 22:41 GMT+08:00 Christian Kandeler christian.kande...@digia.com : About the prefix usage, I think this is not a bug in qbs. In fact, i'm working with qbs plugin in qcreator and have noticed that often, modifications in