aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-06-07 12:36:20 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-06-07 10:44:29 +0000
commit97c630a062af0ba75b22b227d7b4fe37a63a04d3 (patch)
treeab7c69b1586806afbbcd9757f444fcf2edcaba75
parent406203559aae79a85e00554455e9be4fa03873a8 (diff)
Doc: Extend the documentation for the "outer" value
Change-Id: I6fff3d3cc73bd664c29b67239b88c2e09b5d6fe2 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--doc/reference/items/language/module.qdoc3
-rw-r--r--doc/reference/items/language/properties.qdoc15
2 files changed, 17 insertions, 1 deletions
diff --git a/doc/reference/items/language/module.qdoc b/doc/reference/items/language/module.qdoc
index 27b3167a6..8b6c5ca9b 100644
--- a/doc/reference/items/language/module.qdoc
+++ b/doc/reference/items/language/module.qdoc
@@ -131,7 +131,8 @@
\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}:
+ in the surrounding item. It is only valid in \l{Group Item}{groups} and
+ \l{Properties Item}{Properties items}:
\code
Product {
Depends { name: "mymodule" }
diff --git a/doc/reference/items/language/properties.qdoc b/doc/reference/items/language/properties.qdoc
index 4e2cb345f..d9f601ddb 100644
--- a/doc/reference/items/language/properties.qdoc
+++ b/doc/reference/items/language/properties.qdoc
@@ -89,6 +89,21 @@
}
\endcode
+ In \c Properties items one can access the \l{Module Item#outer}{outer value} of a property.
+ \code
+ Product {
+ Properties {
+ condition: qbs.targetOS.contains("windows")
+ cpp.defines: outer.concat("ON_WINDOWS") // === ["FOO", "ON_WINDOWS"]
+ }
+ Properties {
+ condition: qbs.targetOS.contains("linux")
+ cpp.defines: ["ON_LINUX"] // === ["ON_LINUX"]
+ }
+ cpp.defines: ["FOO"]
+ }
+ \endcode
+
We suggest to use the \c Properties item for mutually exclusive conditions only. It is
especially useful if there are several properties to set, based on the same condition.