Sophie

Sophie

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

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" />
<!-- probe.qdoc -->
  <title>Probe 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-parameters.html" />
  <link rel="next" href="qml-qbslanguageitems-product.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="qml-qbslanguageitems-parameters.html">Parameters</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="qml-qbslanguageitems-product.html">Product</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">Probe QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Probe-brief -->
<p>Locates files outside the project. <a href="#details">More...</a></p>
<!-- @@@Probe -->
<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-probe-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-probe.html#condition-prop">condition</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qbslanguageitems-probe.html#configure-prop">configure</a></b></b> : script</li>
<li class="fn"><b><b><a href="qml-qbslanguageitems-probe.html#found-prop">found</a></b></b> : bool</li>
</ul>
<!-- $$$Probe-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>Probe items can appear inside <a href="qml-qbslanguageitems-product.html">Product</a> and <a href="qml-qbslanguageitems-project.html">Project</a> items. They are run prior to building, for instance to locate dependent headers, libraries, and other files outside the project directory whose locations are not known ahead of time. Probes can be parameterized via their properties and typically store results in properties as well. These results are then retrieved via the Probe's id, which is mandatory:</p>
<pre class="cpp">

  Product {
      Probe {
          id: valueCalculator
          property string parameter: <span class="string">&quot;whatever&quot;</span>
          property <span class="type">int</span> value
          configure: {
              value <span class="operator">=</span> Utils<span class="operator">.</span>calculateValue(parameter); <span class="comment">// Expensive operation</span>
              found <span class="operator">=</span> <span class="keyword">true</span>;
          }
      }
      property <span class="type">int</span> theValue: valueCalculator<span class="operator">.</span>value
  }

</pre>
<p><b>Note: </b>Because Probes often invoke external processes, which is relatively expensive compared to evaluating normal properties, their results are cached. To force re-evaluation of a Probe, you can supply the <a href="cli-build.html#build-force-probe-execution">--force-probe-execution</a> command-line option to the <a href="cli-build.html">build</a> command.</p><!-- @@@Probe -->
<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>Determines whether the probe will actually be run.</p>
<p>Default: <code>true</code></p>
</div></div><!-- @@@condition -->
<br/>
<!-- $$$configure -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="configure-prop">
<td class="tblQmlPropNode"><p>
<a name="configure-prop"></a><span class="name">configure</span> : <span class="type">script</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>A script that is executed when the probe is run.</p>
</div></div><!-- @@@configure -->
<br/>
<!-- $$$found -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="found-prop">
<td class="tblQmlPropNode"><p>
<a name="found-prop"></a><span class="name">found</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Indicates whether the probe was run successfully. Set by <a href="qml-qbslanguageitems-probe.html#configure-prop">configure</a>.</p>
<p>Default: Undefined</p>
</div></div><!-- @@@found -->
<br/>
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="qml-qbslanguageitems-parameters.html">Parameters</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="qml-qbslanguageitems-product.html">Product</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>