aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorIvan Komissarov <ABBAPOH@gmail.com>2019-06-08 18:20:03 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2019-06-26 15:25:30 +0000
commit06f46da6c31de7d5b767da38713b11b1a117b34e (patch)
treeb23b248961c0d71943a3978969cdd1bd19361de1 /doc
parentd214864b666d3551fe25a648b82832fcbd241b2e (diff)
Add PathProbe::candidateFilter property
This property can be used to check if candidate conforms with some conditions. For example, an architecture of a shared library candidate should match the current qbs.architecture. Also, this will allow to implement support for the "text based stub libraries" (yaml files that point to a real library in a system) on macOS - instead of checking real file architecture, it should be read from .tbd file Change-Id: Ie84a3e70d883dec949440358e2f08213a8501982 Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/items/probe/path-probe.qdoc19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/reference/items/probe/path-probe.qdoc b/doc/reference/items/probe/path-probe.qdoc
index 5b0cc1bb6..eaaee9e54 100644
--- a/doc/reference/items/probe/path-probe.qdoc
+++ b/doc/reference/items/probe/path-probe.qdoc
@@ -75,6 +75,25 @@
*/
/*!
+ \qmlproperty var PathProbe::candidateFilter
+
+ This property holds the function that can be used to filter out unsuitable candidates.
+ For example, when searching for a library, it might be necessary to check its architecture:
+ \code
+ PathProbe {
+ pathSuffixes: ["*.so", *.dll]
+ candidateFilter: {
+ function getLibraryArchitecture(file) { ... }
+ return function(file) {
+ return Utilities.isSharedLibrary(file)
+ && getLibraryArchitecture(file) == qbs.architecture;
+ }
+ }
+ }
+ \endcode
+*/
+
+/*!
\qmlproperty stringList PathProbe::names
The list of file names to search for.