Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 9cb465b43d7d9d0502376cd911c5ab45 > files > 152

qbs-doc-1.12.2-2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- scanner.qdoc -->
  <title>Scanner QML Type | Qbs Manual</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="index.html">Qbs Manual</a></td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qbs 1.12.2</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
  <link rel="prev" href="qml-qbslanguageitems-rule.html" />
  <link rel="next" href="qml-qbslanguageitems-subproject.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="qml-qbslanguageitems-rule.html">Rule</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="qml-qbslanguageitems-subproject.html">SubProject</a>
</p><p/>
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Scanner QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Scanner-brief -->
<p>Creates custom dependency scanners in modules. <a href="#details">More...</a></p>
<!-- @@@Scanner -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QbsLanguageItems .</td></tr></table></div><ul>
<li><a href="qml-qbslanguageitems-scanner-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qbslanguageitems-scanner.html#condition-prop">condition</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qbslanguageitems-scanner.html#inputs-prop">inputs</a></b></b> : stringList</li>
<li class="fn"><b><b><a href="qml-qbslanguageitems-scanner.html#recursive-prop">recursive</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qbslanguageitems-scanner.html#scan-prop">scan</a></b></b> : script</li>
<li class="fn"><b><b><a href="qml-qbslanguageitems-scanner.html#searchPaths-prop">searchPaths</a></b></b> : script</li>
</ul>
<!-- $$$Scanner-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>A Scanner item can appear inside a <a href="qml-qbslanguageitems-module.html">Module</a> item, and allows to extract dependencies for artifacts from the artifacts' file contents. For example, this is what a scanner for &quot;qrc&quot; files might look like:</p>
<pre class="cpp">

  import qbs<span class="operator">.</span>Xml

  Module {
    Scanner {
      inputs: <span class="char">'qrc'</span>
      scan: {
        var xml <span class="operator">=</span> <span class="keyword">new</span> Xml<span class="operator">.</span>DomDocument(input<span class="operator">.</span>filePath);
        dependencies <span class="operator">=</span> <span class="operator">[</span><span class="operator">]</span>;
        <span class="comment">// retrieve &lt;file&gt; entries from the XML document</span>
        <span class="keyword">return</span> dependencies;
      }
    }
  }

</pre>
<!-- @@@Scanner -->
<h2>Property Documentation</h2>
<!-- $$$condition -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="condition-prop">
<td class="tblQmlPropNode"><p>
<a name="condition-prop"></a><span class="name">condition</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>If <code>true</code>, the scanner is enabled, otherwise it does nothing.</p>
<p>Default: <code>true</code></p>
</div></div><!-- @@@condition -->
<br/>
<!-- $$$inputs -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="inputs-prop">
<td class="tblQmlPropNode"><p>
<a name="inputs-prop"></a><span class="name">inputs</span> : <span class="type">stringList</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>A list of <a href="qml-qbslanguageitems-filetagger.html">file tags</a> the input artifacts must match.</p>
<p>Default: Undefined</p>
</div></div><!-- @@@inputs -->
<br/>
<!-- $$$recursive -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="recursive-prop">
<td class="tblQmlPropNode"><p>
<a name="recursive-prop"></a><span class="name">recursive</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Determines whether to scan the returned <a href="qml-qbslanguageitems-depends.html">dependencies</a> using the same scanner.</p>
<p>Default: <code>false</code></p>
</div></div><!-- @@@recursive -->
<br/>
<!-- $$$scan -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="scan-prop">
<td class="tblQmlPropNode"><p>
<a name="scan-prop"></a><span class="name">scan</span> : <span class="type">script</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>A script that reads the input artifact and returns a string list with <a href="qml-qbslanguageitems-depends.html">dependencies</a>.</p>
<p>The code in this script is treated as a function with the signature <code>function(project, product, input)</code>.</p>
<p>Default: Undefined</p>
</div></div><!-- @@@scan -->
<br/>
<!-- $$$searchPaths -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="searchPaths-prop">
<td class="tblQmlPropNode"><p>
<a name="searchPaths-prop"></a><span class="name">searchPaths</span> : <span class="type">script</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>A script that returns the paths where to look for <a href="qml-qbslanguageitems-depends.html">dependencies</a>.</p>
<p>The code in this script is treated as a function with the signature <code>function(project, product, input)</code>.</p>
<p>Default: Undefined</p>
</div></div><!-- @@@searchPaths -->
<br/>
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="qml-qbslanguageitems-rule.html">Rule</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="qml-qbslanguageitems-subproject.html">SubProject</a>
</p>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>