Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
2.1.1, 2.1.2
-
None
-
b661c34d8 (master)
Description
In my project, I have a certain naming style guide for the products. For example, all QML engine extensions are prefixed by ext- and all dynamically loaded plugins are prefixed with plugin-.
Now, I want to simplify life for myself so that I can write something like this:
mega-app.qbs
Application { Relies { on: 'lib-logger' } Relies { on: 'ext-controls' } Relies { on: 'plugin-mega-addon' } name: 'mega-app' }
For this, I define an auxiliary item like this:
Relies.qbs
Depends { id: root property string on name: on enableFallback: false cpp.link: { var prefix = root.name.split('-')[0] console.warn(root.name) // => name of the product, // not of the Depends item console.warn(root.on) // => undefined return prefix !== 'ext' && prefix !== 'plugin' } }
I described the actual result in the comments above.
The expected behavior though would be to get the property of the item, not of the product it's in. Effectively, root.name should be equal to root.on in this case.