6.0.0-rc4Source

QDBusPendingCall Class

The QDBusPendingCall class refers to one pending asynchronous call. More…

Header#include <QDBusPendingCall>
CMaketarget_link_libraries(app PRIVATE Nt::DBus)
ModuleNt D-Bus C++ Classes
Inherited byQDBusPendingCallWatcher

List of all members, including inherited members

Public Functions

QDBusPendingCall(const QDBusPendingCall &other)
QDBusPendingCall(QDBusPendingCall &&other)
QDBusPendingCall &operator=(const QDBusPendingCall &other)
QDBusPendingCall &operator=(QDBusPendingCall &&other)
~QDBusPendingCall()
voidswap(QDBusPendingCall &other)
boolisFinished() const
voidwaitForFinished()
boolisError() const
boolisValid() const
QDBusErrorerror() const
QDBusMessagereply() const

Static Public Members

QDBusPendingCallfromError(const QDBusError &error)
QDBusPendingCallfromCompletedCall(const QDBusMessage &message)

Protected Functions

Detailed Description

QDBusConnection::asyncCall() and QDBusAbstractInterface::asyncCall() return one. Wait for it with waitForFinished(), or watch it with a QDBusPendingCallWatcher. Copies refer to the same call.

See also QDBusPendingReply and QDBusPendingCallWatcher.

Differences from Qt

None.

Member Function Documentation

QDBusPendingCall::QDBusPendingCall(const QDBusPendingCall &other)

Constructs a copy of other, which refers to the same call.

QDBusPendingCall::QDBusPendingCall(QDBusPendingCall &&other)

Constructs an object that takes the place of other.

[protected] QDBusPendingCall::QDBusPendingCall()

Constructs an object that refers to no call. It is finished, with an error.

QDBusPendingCall::~QDBusPendingCall()

Destroys the object. The call goes on.

QDBusError QDBusPendingCall::error() const

Returns the error of the call, which is invalid unless it finished with an error.

[static] QDBusPendingCall QDBusPendingCall::fromCompletedCall(const QDBusMessage &message)

Returns a call that has finished with message, which should be a reply or an error.

[static] QDBusPendingCall QDBusPendingCall::fromError(const QDBusError &error)

Returns a call that has finished with error.

bool QDBusPendingCall::isError() const

Returns true if the call finished with an error.

bool QDBusPendingCall::isFinished() const

Returns true if the reply has arrived, or the call failed.

bool QDBusPendingCall::isValid() const

Returns true if the call finished with a reply.

QDBusPendingCall & QDBusPendingCall::operator=(const QDBusPendingCall &other)

Makes this object refer to the call of other and returns a reference to it.

QDBusPendingCall & QDBusPendingCall::operator=(QDBusPendingCall &&other)

Moves other into this object and returns a reference to it.

QDBusMessage QDBusPendingCall::reply() const

Returns the reply, or an invalid message while the call has not finished.

void QDBusPendingCall::swap(QDBusPendingCall &other)

Swaps this object with other.

void QDBusPendingCall::waitForFinished()

Blocks until the call has finished, without running the event loop.