summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-13 18:12:58 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-25 06:19:05 +0000
commitba38926bbfe433344435f2a2cd08bd7e4b157153 (patch)
tree213286a3c47acfcee2285c941ad210b55cdc1ca6 /qmake
parent22f3800cac47b1b3d10474e8489ddb83cffd4b1e (diff)
improve the docu of $$member()
Change-Id: Id8b43fd7e76f8d3f73ff323a59d1a980bf86c4d3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/doc/src/qmake-manual.qdoc31
1 files changed, 24 insertions, 7 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index c22bce3e3e..70210b7342 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -2934,14 +2934,31 @@
See also \l{upper(arg1 [, arg2 ..., argn])}{upper()}.
- \section2 member(variablename, position)
+ \section2 member(variablename [, start [, end]])
- Returns the value at the given \c position in the list of items in
- \c variablename.
- If an item cannot be found at the position specified, an empty string is
- returned. \c variablename is the only required field. If not specified,
- \c position defaults to 0, causing the first value in the list to be
- returned.
+ Returns the slice of the list value of \c variablename with the
+ zero-based element indices between \c start and \c end (inclusive).
+
+ If \c start is not given, it defaults to zero. This usage is
+ equivalent to \c $$first(variablename).
+
+ If \c end is not given, it defaults to \c start. This usage represents
+ simple array indexing, as exactly one element will be returned.
+
+ It is also possible to specify start and end in a single argument, with
+ the numbers separated by two periods.
+
+ Negative numbers represent indices starting from the end of the list,
+ with -1 being the last element.
+
+ If either index is out of range, an empty list is returned.
+
+ If \c end is smaller than \c start, the elements are returned
+ in reverse order.
+
+ \note The fact that the end index is inclusive and unordered implies
+ that an empty list will be returned only when an index is invalid
+ (which is implied by the input variable being empty).
\section2 num_add(arg1 [, arg2 ..., argn])