Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 944

qtbase5-doc-5.9.4-1.1.mga6.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" />
<!-- qdbuspendingreply.cpp -->
  <title>QDBusPendingReply Class | Qt D-Bus</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 >Qt 5.9</td><td ><a href="qtdbus-index.html">Qt D-Bus</a></td><td ><a href="qtdbus-module.html">C++ Classes</a></td><td >QDBusPendingReply</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</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">QDBusPendingReply Class</h1>
<!-- $$$QDBusPendingReply-brief -->
<p>The <a href="qdbuspendingreply.html">QDBusPendingReply</a> class contains the reply to an asynchronous method call <a href="#details">More...</a></p>
<!-- @@@QDBusPendingReply -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QDBusPendingReply&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += dbus</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.5</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qdbuspendingcall.html">QDBusPendingCall</a></td></tr></table></div><ul>
<li><a href="qdbuspendingreply-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#QDBusPendingReply">QDBusPendingReply</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#QDBusPendingReply-1">QDBusPendingReply</a></b>(const QDBusPendingReply &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#QDBusPendingReply-2">QDBusPendingReply</a></b>(const QDBusPendingCall &amp;<i>call</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#QDBusPendingReply-3">QDBusPendingReply</a></b>(const QDBusMessage &amp;<i>message</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#argumentAt">argumentAt</a></b>(int <i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Type </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#argumentAt-1">argumentAt</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#count">count</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusError </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#error">error</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#isError">isError</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#isFinished">isFinished</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#isValid">isValid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusMessage </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#reply">reply</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> T1 </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#value">value</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#waitForFinished">waitForFinished</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#operator-T1">operator T1</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusPendingReply &amp;</td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#operator-eq">operator=</a></b>(const QDBusPendingReply &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusPendingReply &amp;</td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#operator-eq-1">operator=</a></b>(const QDBusPendingCall &amp;<i>call</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusPendingReply &amp;</td><td class="memItemRight bottomAlign"><b><a href="qdbuspendingreply.html#operator-eq-2">operator=</a></b>(const QDBusMessage &amp;<i>message</i>)</td></tr>
</table></div>
<ul>
<li class="fn">3 public functions inherited from <a href="qdbuspendingcall.html#public-functions">QDBusPendingCall</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">2 static public members inherited from <a href="qdbuspendingcall.html#static-public-members">QDBusPendingCall</a></li>
</ul>
<a name="details"></a>
<!-- $$$QDBusPendingReply-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qdbuspendingreply.html">QDBusPendingReply</a> class contains the reply to an asynchronous method call</p>
<p>The <a href="qdbuspendingreply.html">QDBusPendingReply</a> is a template class with up to 8 template parameters. Those parameters are the types that will be used to extract the contents of the reply's data.</p>
<p>This class is similar in functionality to <a href="qdbusreply.html">QDBusReply</a>, but with two important differences:</p>
<ul>
<li><a href="qdbusreply.html">QDBusReply</a> accepts exactly one return type, whereas <a href="qdbuspendingreply.html">QDBusPendingReply</a> can have from 1 to 8 types</li>
<li><a href="qdbusreply.html">QDBusReply</a> only works on already completed replies, whereas <a href="qdbuspendingreply.html">QDBusPendingReply</a> allows one to wait for replies from pending calls</li>
</ul>
<p>Where with <a href="qdbusreply.html">QDBusReply</a> you would write:</p>
<pre class="cpp">

  <span class="type"><a href="qdbusreply.html">QDBusReply</a></span><span class="operator">&lt;</span><span class="type"><a href="../qtcore/qstring.html">QString</a></span><span class="operator">&gt;</span> reply <span class="operator">=</span> interface<span class="operator">-</span><span class="operator">&gt;</span>call(<span class="string">&quot;RemoteMethod&quot;</span>);
  <span class="keyword">if</span> (reply<span class="operator">.</span>isValid())
      <span class="comment">// use the returned value</span>
      useValue(reply<span class="operator">.</span>value());
  <span class="keyword">else</span>
      <span class="comment">// call failed. Show an error condition.</span>
      showError(reply<span class="operator">.</span>error());

</pre>
<p>with <a href="qdbuspendingreply.html">QDBusPendingReply</a>, the equivalent code (including the blocking wait for the reply) would be:</p>
<pre class="cpp">

      <span class="type"><a href="qdbuspendingreply.html#QDBusPendingReply">QDBusPendingReply</a></span><span class="operator">&lt;</span><span class="type"><a href="../qtcore/qstring.html">QString</a></span><span class="operator">&gt;</span> reply <span class="operator">=</span> interface<span class="operator">-</span><span class="operator">&gt;</span>asyncCall(<span class="string">&quot;RemoteMethod&quot;</span>);
      reply<span class="operator">.</span>waitForFinished();
      <span class="keyword">if</span> (reply<span class="operator">.</span>isError())
          <span class="comment">// call failed. Show an error condition.</span>
          showError(reply<span class="operator">.</span>error());
      <span class="keyword">else</span>
          <span class="comment">// use the returned value</span>
          useValue(reply<span class="operator">.</span>value());

</pre>
<p>For method calls that have more than one output argument, with <a href="qdbusreply.html">QDBusReply</a>, you would write:</p>
<pre class="cpp">

  <span class="type"><a href="../qtcore/qstring.html">QString</a></span> reply <span class="operator">=</span> interface<span class="operator">-</span><span class="operator">&gt;</span>call(<span class="string">&quot;RemoteMethod&quot;</span>);

</pre>
<p>whereas with <a href="qdbuspendingreply.html">QDBusPendingReply</a>, all of the output arguments should be template parameters:</p>
<pre class="cpp">

      <span class="type"><a href="qdbuspendingreply.html#QDBusPendingReply">QDBusPendingReply</a></span><span class="operator">&lt;</span>bool<span class="operator">,</span> <span class="type"><a href="../qtcore/qstring.html">QString</a></span><span class="operator">&gt;</span> reply <span class="operator">=</span> interface<span class="operator">-</span><span class="operator">&gt;</span>asyncCall(<span class="string">&quot;RemoteMethod&quot;</span>);
      reply<span class="operator">.</span>waitForFinished();
      <span class="keyword">if</span> (<span class="operator">!</span>reply<span class="operator">.</span>isError()) {
          <span class="keyword">if</span> (reply<span class="operator">.</span>argumentAt<span class="operator">&lt;</span><span class="number">0</span><span class="operator">&gt;</span>())
              showSuccess(reply<span class="operator">.</span>argumentAt<span class="operator">&lt;</span><span class="number">1</span><span class="operator">&gt;</span>());
          <span class="keyword">else</span>
              showFailure(reply<span class="operator">.</span>argumentAt<span class="operator">&lt;</span><span class="number">1</span><span class="operator">&gt;</span>());
      }

</pre>
<p><a href="qdbuspendingreply.html">QDBusPendingReply</a> objects can be associated with <a href="qdbuspendingcallwatcher.html">QDBusPendingCallWatcher</a> objects, which emit signals when the reply arrives.</p>
</div>
<p><b>See also </b><a href="qdbuspendingcallwatcher.html">QDBusPendingCallWatcher</a>, <a href="qdbusreply.html">QDBusReply</a>, and <a href="qdbusabstractinterface.html#asyncCall">QDBusAbstractInterface::asyncCall</a>().</p>
<!-- @@@QDBusPendingReply -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDBusPendingReply[overload1]$$$QDBusPendingReply -->
<h3 class="fn" id="QDBusPendingReply"><a name="QDBusPendingReply"></a>QDBusPendingReply::<span class="name">QDBusPendingReply</span>()</h3>
<p>Creates an empty <a href="qdbuspendingreply.html">QDBusPendingReply</a> object. Without assigning a <a href="qdbuspendingcall.html">QDBusPendingCall</a> object to this reply, <a href="qdbuspendingreply.html">QDBusPendingReply</a> cannot do anything. All functions return their failure values.</p>
<!-- @@@QDBusPendingReply -->
<!-- $$$QDBusPendingReply$$$QDBusPendingReplyconstQDBusPendingReply& -->
<h3 class="fn" id="QDBusPendingReply-1"><a name="QDBusPendingReply-1"></a>QDBusPendingReply::<span class="name">QDBusPendingReply</span>(const <span class="type"><a href="qdbuspendingreply.html#QDBusPendingReply">QDBusPendingReply</a></span> &amp;<i>other</i>)</h3>
<p>Creates a copy of the <i>other</i> <a href="qdbuspendingreply.html">QDBusPendingReply</a> object. Just like <a href="qdbuspendingcall.html">QDBusPendingCall</a> and <a href="qdbuspendingcallwatcher.html">QDBusPendingCallWatcher</a>, this <a href="qdbuspendingreply.html">QDBusPendingReply</a> object will share the same pending call reference. All copies share the same return values.</p>
<!-- @@@QDBusPendingReply -->
<!-- $$$QDBusPendingReply$$$QDBusPendingReplyconstQDBusPendingCall& -->
<h3 class="fn" id="QDBusPendingReply-2"><a name="QDBusPendingReply-2"></a>QDBusPendingReply::<span class="name">QDBusPendingReply</span>(const <span class="type"><a href="qdbuspendingcall.html#QDBusPendingCall">QDBusPendingCall</a></span> &amp;<i>call</i>)</h3>
<p>Creates a <a href="qdbuspendingreply.html">QDBusPendingReply</a> object that will take its contents from the <i>call</i> pending asynchronous call. This <a href="qdbuspendingreply.html">QDBusPendingReply</a> object will share the same pending call reference as <i>call</i>.</p>
<!-- @@@QDBusPendingReply -->
<!-- $$$QDBusPendingReply$$$QDBusPendingReplyconstQDBusMessage& -->
<h3 class="fn" id="QDBusPendingReply-3"><a name="QDBusPendingReply-3"></a>QDBusPendingReply::<span class="name">QDBusPendingReply</span>(const <span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> &amp;<i>message</i>)</h3>
<p>Creates a <a href="qdbuspendingreply.html">QDBusPendingReply</a> object that will take its contents from the message <i>message</i>. In this case, this object will be already in its finished state and the reply's contents will be accessible.</p>
<p><b>See also </b><a href="qdbuspendingreply.html#isFinished">isFinished</a>().</p>
<!-- @@@QDBusPendingReply -->
<!-- $$$argumentAt[overload1]$$$argumentAtint -->
<h3 class="fn" id="argumentAt"><a name="argumentAt"></a><span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> QDBusPendingReply::<span class="name">argumentAt</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>Returns the argument at position <i>index</i> in the reply's contents. If the reply doesn't have that many elements, this function's return value is undefined (will probably cause an assertion failure), so it is important to verify that the processing is finished and the reply is valid.</p>
<p>If the reply does not contain an argument at position <i>index</i> or if the reply was an error, this function returns an invalid <a href="../qtcore/qvariant.html">QVariant</a>. Since D-Bus messages can never contain invalid QVariants, this return can be used to detect an error condition.</p>
<!-- @@@argumentAt -->
<!-- $$$argumentAt$$$argumentAt -->
<h3 class="fn" id="argumentAt-1"><a name="argumentAt-1"></a><span class="type">Type</span> QDBusPendingReply::<span class="name">argumentAt</span>() const</h3>
<p>Returns the argument at position <code>Index</code> (which is a template parameter) cast to type <code>Type</code>. This function uses template code to determine the proper <code>Type</code> type, according to the type list used in the construction of this object.</p>
<p>Note that, if the reply hasn't arrived, this function causes the calling thread to block until the reply is processed.</p>
<p>If the reply does not contain an argument at position <code>Index</code> or if the reply was an error, this function returns a <code>Type</code> object that is default constructed, which may be indistinguishable from a valid value. To reliably determine whether the message was an error, use <a href="qdbuspendingreply.html#isError">isError</a>().</p>
<!-- @@@argumentAt -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn" id="count"><a name="count"></a><span class="type">int</span> QDBusPendingReply::<span class="name">count</span>() const</h3>
<p>Return the number of arguments the reply is supposed to have. This number matches the number of non-void template parameters in this class.</p>
<p>If the reply arrives with a different number of arguments (or with different types), it will be transformed into an error reply indicating a bad signature.</p>
<!-- @@@count -->
<!-- $$$error[overload1]$$$error -->
<h3 class="fn" id="error"><a name="error"></a><span class="type"><a href="qdbuserror.html">QDBusError</a></span> QDBusPendingReply::<span class="name">error</span>() const</h3>
<p>Retrieves the error content of the reply message, if it has finished processing. If the reply message has not finished processing or if it contains a normal reply message (non-error), this function returns an invalid <a href="qdbuserror.html">QDBusError</a>.</p>
<!-- @@@error -->
<!-- $$$isError[overload1]$$$isError -->
<h3 class="fn" id="isError"><a name="isError"></a><span class="type">bool</span> QDBusPendingReply::<span class="name">isError</span>() const</h3>
<p>Returns <code>true</code> if the reply contains an error message, false if it contains a normal method reply.</p>
<p>If the pending call has not finished processing, this function also returns <code>true</code>.</p>
<!-- @@@isError -->
<!-- $$$isFinished[overload1]$$$isFinished -->
<h3 class="fn" id="isFinished"><a name="isFinished"></a><span class="type">bool</span> QDBusPendingReply::<span class="name">isFinished</span>() const</h3>
<p>Returns <code>true</code> if the pending call has finished processing and the reply has been received. If this function returns <code>true</code>, the <a href="qdbuspendingreply.html#isError">isError</a>(), <a href="qdbuspendingreply.html#error">error</a>() and <a href="qdbuspendingreply.html#reply">reply</a>() methods should return valid information.</p>
<p>Note that this function only changes state if you call <a href="qdbuspendingreply.html#waitForFinished">waitForFinished</a>() or if an external D-Bus event happens, which in general only happens if you return to the event loop execution.</p>
<p><b>See also </b><a href="qdbuspendingcallwatcher.html#isFinished">QDBusPendingCallWatcher::isFinished</a>().</p>
<!-- @@@isFinished -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn" id="isValid"><a name="isValid"></a><span class="type">bool</span> QDBusPendingReply::<span class="name">isValid</span>() const</h3>
<p>Returns <code>true</code> if the reply contains a normal reply message, false if it contains anything else.</p>
<p>If the pending call has not finished processing, this function return false.</p>
<!-- @@@isValid -->
<!-- $$$reply[overload1]$$$reply -->
<h3 class="fn" id="reply"><a name="reply"></a><span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> QDBusPendingReply::<span class="name">reply</span>() const</h3>
<p>Retrieves the reply message received for the asynchronous call that was sent, if it has finished processing. If the pending call is not finished, this function returns a <a href="qdbusmessage.html">QDBusMessage</a> of type <a href="qdbusmessage.html#MessageType-enum">QDBusMessage::InvalidMessage</a>.</p>
<p>After it has finished processing, the message type will either be an error message or a normal method reply message.</p>
<!-- @@@reply -->
<!-- $$$value[overload1]$$$value -->
<h3 class="fn" id="value"><a name="value"></a><span class="type">T1</span> QDBusPendingReply::<span class="name">value</span>() const</h3>
<p>Returns the first argument in this reply, cast to type <code>T1</code> (the first template parameter of this class). This is equivalent to calling <a href="qdbuspendingreply.html#argumentAt">argumentAt</a>&lt;0&gt;().</p>
<p>This function is provided as a convenience, matching the <a href="qdbusreply.html#value">QDBusReply::value</a>() function.</p>
<p>Note that, if the reply hasn't arrived, this function causes the calling thread to block until the reply is processed.</p>
<p>If the reply is an error reply, this function returns a default-constructed <code>T1</code> object, which may be indistinguishable from a valid value. To reliably determine whether the message was an error, use <a href="qdbuspendingreply.html#isError">isError</a>().</p>
<!-- @@@value -->
<!-- $$$waitForFinished[overload1]$$$waitForFinished -->
<h3 class="fn" id="waitForFinished"><a name="waitForFinished"></a><span class="type">void</span> QDBusPendingReply::<span class="name">waitForFinished</span>()</h3>
<p>Suspends the execution of the calling thread until the reply is received and processed. After this function returns, <a href="qdbuspendingreply.html#isFinished">isFinished</a>() should return true, indicating the reply's contents are ready to be processed.</p>
<p><b>See also </b><a href="qdbuspendingcallwatcher.html#waitForFinished">QDBusPendingCallWatcher::waitForFinished</a>().</p>
<!-- @@@waitForFinished -->
<!-- $$$operator T1[overload1]$$$operator T1 -->
<h3 class="fn" id="operator-T1"><a name="operator-T1"></a>QDBusPendingReply::<span class="name">operator T1</span>() const</h3>
<p>Returns the first argument in this reply, cast to type <code>T1</code> (the first template parameter of this class). This is equivalent to calling <a href="qdbuspendingreply.html#argumentAt">argumentAt</a>&lt;0&gt;().</p>
<p>This function is provided as a convenience, matching the <a href="qdbusreply.html#value">QDBusReply::value</a>() function.</p>
<p>Note that, if the reply hasn't arrived, this function causes the calling thread to block until the reply is processed.</p>
<p>If the reply is an error reply, this function returns a default-constructed <code>T1</code> object, which may be indistinguishable from a valid value. To reliably determine whether the message was an error, use <a href="qdbuspendingreply.html#isError">isError</a>().</p>
<!-- @@@operator T1 -->
<!-- $$$operator=[overload1]$$$operator=constQDBusPendingReply& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qdbuspendingreply.html#QDBusPendingReply">QDBusPendingReply</a></span> &amp;QDBusPendingReply::<span class="name">operator=</span>(const <span class="type"><a href="qdbuspendingreply.html#QDBusPendingReply">QDBusPendingReply</a></span> &amp;<i>other</i>)</h3>
<p>Makes a copy of <i>other</i> and drops the reference to the current pending call. If the current reference is to an unfinished pending call and this is the last reference, the pending call will be canceled and there will be no way of retrieving the reply's contents, when they arrive.</p>
<!-- @@@operator= -->
<!-- $$$operator=$$$operator=constQDBusPendingCall& -->
<h3 class="fn" id="operator-eq-1"><a name="operator-eq-1"></a><span class="type"><a href="qdbuspendingreply.html#QDBusPendingReply">QDBusPendingReply</a></span> &amp;QDBusPendingReply::<span class="name">operator=</span>(const <span class="type"><a href="qdbuspendingcall.html#QDBusPendingCall">QDBusPendingCall</a></span> &amp;<i>call</i>)</h3>
<p>Makes this object take its contents from the <i>call</i> pending call and drops the reference to the current pending call. If the current reference is to an unfinished pending call and this is the last reference, the pending call will be canceled and there will be no way of retrieving the reply's contents, when they arrive.</p>
<!-- @@@operator= -->
<!-- $$$operator=$$$operator=constQDBusMessage& -->
<h3 class="fn" id="operator-eq-2"><a name="operator-eq-2"></a><span class="type"><a href="qdbuspendingreply.html#QDBusPendingReply">QDBusPendingReply</a></span> &amp;QDBusPendingReply::<span class="name">operator=</span>(const <span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> &amp;<i>message</i>)</h3>
<p>Makes this object take its contents from the <i>message</i> message and drops the reference to the current pending call. If the current reference is to an unfinished pending call and this is the last reference, the pending call will be canceled and there will be no way of retrieving the reply's contents, when they arrive.</p>
<p>After this function is finished, the <a href="qdbuspendingreply.html">QDBusPendingReply</a> object will be in its &quot;finished&quot; state and the <i>message</i> contents will be accessible.</p>
<p><b>See also </b><a href="qdbuspendingreply.html#isFinished">isFinished</a>().</p>
<!-- @@@operator= -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 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>