[Qbs] Can't find variable when using custom property
christian.kandeler at qt.io
Tue Feb 6 11:28:09 CET 2018
On Tue, 6 Feb 2018 10:57:54 +0100
Ola Røer Thorsen <ola at silentwings.no> wrote:
> > Custom properties are collected and made accessible in rules for the
> > Product, Project and Modules items.
> > For all other items, only the built-in properties are retrieved and acted
> > upon according to their documented semantics.
> Right. What's the reasoning why custom properties aren't generally allowed?
> I would like an error message from qbs if I create a custom property
> somewhere that cannot be used, at least. I'm quite used to writing regular
> Qt Quick qml and this is then unexpected.
Rule execution happens in a different context at a different time, meaning the prepare and outputArtifacts scripts are quite detached from their surroundings and know only the information that is passed to them via their implicit function arguments. In particular, they do not share a scope with the surrounding items.
More information about the Qbs