[Qbs] Can't find variable when using custom property

Ola Røer Thorsen ola at silentwings.no
Tue Feb 6 10:57:54 CET 2018


> 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.


> > My use-case here is that in another Product I plan to do this:
> > import "myrule.qbs" as MyRule
> > ...
> > MyRule { myProperty: "1" }
> > MyRule { myProperty: "2" }
> > MyRule { myProperty: "3" }
> > MyRule { myProperty: "etc" }
>
> Yes, I can see how that could be useful (see also the TODO item in
> CppModule.qbs). You might want to create a task in our bugtracker.
>

I'll do that. Thanks,

Ola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20180206/9cf0d115/attachment.html>


More information about the Qbs mailing list