summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2021-11-03 19:39:43 +0100
committerMitch Curtis <mitch.curtis@qt.io>2021-12-15 13:04:18 +0000
commit7663e2dc05840458123915c1eb2752f2b4cb2b03 (patch)
tree015f363812ca00a92b7812bc1d2ce203288b06e1
parent05d782bf544cd5cb995d0902ce934b8af44540de (diff)
downloadqbs-7663e2dc05840458123915c1eb2752f2b4cb2b03.tar.gz
Document how to append files to base properties in derived types
Change-Id: I5ee6d7bce9aa6479f7603356304e0a0f99f05610 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
-rw-r--r--doc/howtos.qdoc26
-rw-r--r--doc/qbs.qdoc7
2 files changed, 33 insertions, 0 deletions
diff --git a/doc/howtos.qdoc b/doc/howtos.qdoc
index 47c1cafe8..efb9648c7 100644
--- a/doc/howtos.qdoc
+++ b/doc/howtos.qdoc
@@ -52,6 +52,7 @@
\li \l{How do I limit the number of concurrent jobs for the linker only?}
\li \l{How do I add QML files to a project?}
\li \l{How do I define a reusable Group of files that can be included in other \QBS files?}
+ \li \l{How do I access properties of a base type?}
\li \l{How do I print the value of a property?}
\li \l{How do I debug \QBS scripts?}
\li \l{How do I sign an application for an Apple platform?}
@@ -722,6 +723,31 @@
}
\endcode
+ \section1 How do I access properties of a base type?
+
+ You can use the \l base property. For example, to append to a list of files
+ that come from the base type, you can use \c {base.concat()}:
+
+ \code
+ // TestBase.qbs
+
+ QtGuiApplication {
+ files: [
+ "TestCaseBase.h",
+ "TestCaseBase.cpp"
+ ]
+ }
+ \endcode
+
+ \code
+ // tst_stuff.qbs
+ TestBase {
+ files: base.concat(["tst_stuff.cpp"])
+ }
+ \endcode
+
+ See \l {Special Property Values} for more details.
+
\section1 How do I print the value of a property?
Use the \l {Console API}{console API}. For example, suppose your project
diff --git a/doc/qbs.qdoc b/doc/qbs.qdoc
index b44ba5880..7fcc7e68b 100644
--- a/doc/qbs.qdoc
+++ b/doc/qbs.qdoc
@@ -1131,6 +1131,11 @@
---CrazyProduct.qbs---
Product {
property string craziness: "low"
+
+ files: [
+ "Crazy.h",
+ "Crazy.cpp"
+ ]
}
---hellocrazyworld.qbs---
@@ -1139,6 +1144,7 @@
CrazyProduct {
craziness: "enormous"
name: "hellocrazyworld"
+ files: base.concat(["main.cpp"])
// ...
}
\endcode
@@ -1164,6 +1170,7 @@
}
\endcode
+ See \l {Special Property Values} for more details about the \l base property.
\section1 Modules