QRemoteObjectPendingCall Class
Encapsulates the result of an asynchronous method call. More...
Header: | #include <QRemoteObjectPendingCall> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS RemoteObjects) target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects) |
qmake: | QT += remoteobjects |
Inherited By: | QRemoteObjectPendingCallWatcher and QRemoteObjectPendingReply |
Public Types
enum | Error { NoError, InvalidMessage } |
Public Functions
QRemoteObjectPendingCall(const QRemoteObjectPendingCall &other) | |
QRemoteObjectPendingCall() | |
QRemoteObjectPendingCall & | operator=(const QRemoteObjectPendingCall &other) |
~QRemoteObjectPendingCall() | |
QRemoteObjectPendingCall::Error | error() const |
bool | isFinished() const |
QVariant | returnValue() const |
bool | waitForFinished(int timeout = 30000) |
Static Public Members
QRemoteObjectPendingCall | fromCompletedCall(const QVariant &returnValue) |
Protected Functions
QRemoteObjectPendingCall(QRemoteObjectPendingCallData *dd) |
Protected Variables
QExplicitlySharedDataPointer<QRemoteObjectPendingCallData> | d |
Member Type Documentation
enum QRemoteObjectPendingCall::Error
This enum type specifies the possible error values for a remote call:
Constant | Value | Description |
---|---|---|
QRemoteObjectPendingCall::NoError | 0 | No error occurred. |
QRemoteObjectPendingCall::InvalidMessage | 1 | The default error state prior to the remote call finishing. |
Member Function Documentation
[protected]
QRemoteObjectPendingCall::QRemoteObjectPendingCall(QRemoteObjectPendingCallData *dd)
Default constructs an instance of QRemoteObjectPendingCall.
QRemoteObjectPendingCall::QRemoteObjectPendingCall(const QRemoteObjectPendingCall &other)
Default constructs an instance of QRemoteObjectPendingCall.
QRemoteObjectPendingCall::QRemoteObjectPendingCall()
Default constructs an instance of QRemoteObjectPendingCall.
QRemoteObjectPendingCall &QRemoteObjectPendingCall::operator=(const QRemoteObjectPendingCall &other)
Copy-assignment operator.
QRemoteObjectPendingCall::~QRemoteObjectPendingCall()
Destroys the instance of QRemoteObjectPendingCall.
QRemoteObjectPendingCall::Error QRemoteObjectPendingCall::error() const
Returns the error, if any, from the remote call.
[static]
QRemoteObjectPendingCall QRemoteObjectPendingCall::fromCompletedCall(const QVariant &returnValue)
bool QRemoteObjectPendingCall::isFinished() const
Returns true if the remote call has finished, false otherwise.
A finished call will include a returnValue or error.
QVariant QRemoteObjectPendingCall::returnValue() const
Returns the return value of the remote call.
returnValue will only be valid when the remote call has finished and there are no errors.
bool QRemoteObjectPendingCall::waitForFinished(int timeout = 30000)
Blocks for up to timeout milliseconds, until the remote call has finished.
Returns true
on success, false
otherwise.
Member Variable Documentation
QExplicitlySharedDataPointer<QRemoteObjectPendingCallData> QRemoteObjectPendingCall::d
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. 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.