QDBusPendingCall Class
The QDBusPendingCall class refers to one pending asynchronous call. More…
| Header | #include <QDBusPendingCall> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::DBus) |
| Module | Nt D-Bus C++ Classes |
| Inherited by | QDBusPendingCallWatcher |
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() | |
| void | swap(QDBusPendingCall &other) |
| bool | isFinished() const |
| void | waitForFinished() |
| bool | isError() const |
| bool | isValid() const |
| QDBusError | error() const |
| QDBusMessage | reply() const |
Static Public Members
| QDBusPendingCall | fromError(const QDBusError &error) |
| QDBusPendingCall | fromCompletedCall(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.
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.
QDBusPendingCall QDBusPendingCall::fromCompletedCall(const QDBusMessage &message)
Returns a call that has finished with message, which should be a reply or an error.
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.