diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-07-23 11:55:11 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-08-04 14:47:02 +0000 |
commit | 8c5e63fae7509b6dcc8a3d4387e5d27093ede7fc (patch) | |
tree | f0a844ff4f927ea37f471c7108186d705da44c1e /doc | |
parent | 6cc4b9d6af6ed169cdb05a3925e50d353ab8c8a9 (diff) |
Make it possible to overwrite properties conditionally.
If a product or higher-level module wants to set the property of a
(different) module only if some condition is fulfilled and leave it
unchanged otherwise, it would currently need to duplicate the value
from the module prototype. Obviously, this is not feasible for anything
but the most trivial definitions, and even then it easily introduces
maintenance problems.
Change-Id: If33c93a25dc84603fe95704e8815aa6e3aa1e0e4
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/reference/items/module.qdoc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/reference/items/module.qdoc b/doc/reference/items/module.qdoc index 4a6e38678..343790f47 100644 --- a/doc/reference/items/module.qdoc +++ b/doc/reference/items/module.qdoc @@ -118,6 +118,20 @@ } \endcode + \section2 \c original + This is the value of the property in the module itself (possibly overridden from a profile or + the command line). Use it to set a module property conditionally: + \code + Module { // This is mymodule + property string aProperty: "z" + } + ---------- + Product { + Depends { name: "mymodule" } + Depends { name: "myothermodule" } + mymodule.aProperty: myothermodule.anotherProperty === "x" ? "y" : original // => "y" if myothermodule.anotherProperty is "x", "z" otherwise + \endcode + \section2 \c outer This value is used in nested items, where it refers to the value of the respective property in the surrounding item. It is often encountered in \l{Group Item}{groups}: @@ -133,6 +147,7 @@ } \endcode + \section1 Module Properties \table |