Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
1.12.2
-
None
Description
When implementing modules, the following questions could probably arise. They are currently not answered in the documentation, but I think they should:
- How should module properties be accessed in general inside a module? The code example shows product.txt_processor.unwantedCharacters inside the prepare property. But txt_processor.unwantedCharacters would be also possible.
- Does that work everywhere inside a module and all its nested items or are there any limitations? FileTagger, Artifact, ... for example.
- Accessing modules has changed over time. I remember that we had to use ModUtils in previous versions of Qbs. Is ModUtils still necessary in some cases? If yes, when?
- Is it possible to test product for other module dependencies that txt_processor does not directly depend on and to access those properties if present?
- How to access module properties in JavaScript files loaded by a module?
- Would that be different in JavaScript files loaded by a product?
I am going to contribute a patch to the docs, but I would be glad if somebody like kandeler could provide a short answer to these questions so that I don't have build upon assumptions.