QRemoteObjectPendingCall 類

封裝異步方法調用的結果。 更多...

頭: #include <QRemoteObjectPendingCall>
qmake: QT += remoteobjects
繼承者:

QRemoteObjectPendingCallWatcher and QRemoteObjectPendingReply

公共類型

enum Error { NoError, InvalidMessage }

公共函數

QRemoteObjectPendingCall::Error error () const
bool isFinished () const
QVariant returnValue () const
bool waitForFinished (int timeout = 30000)

詳細描述

成員類型文檔編製

enum QRemoteObjectPendingCall:: Error

此枚舉類型指定用於遠程調用的可能錯誤值:

常量 描述
QRemoteObjectPendingCall::NoError 0 沒有齣現錯誤。
QRemoteObjectPendingCall::InvalidMessage 1 遠程調用完成前的默認錯誤狀態。

成員函數文檔編製

QRemoteObjectPendingCall::Error QRemoteObjectPendingCall:: error () const

返迴錯誤,若有的話,從遠程調用。

bool QRemoteObjectPendingCall:: isFinished () const

返迴 true 若遠程調用已完成,false 否則。

已完成調用將包括 returnValue or error .

QVariant QRemoteObjectPendingCall:: returnValue () const

返迴遠程調用的返迴值。

returnValue will only be valid when the remote call has finished and there are no error

bool QRemoteObjectPendingCall:: waitForFinished ( int timeout = 30000)

阻塞最多 timeout 毫秒,直到遠程調用已完成。

返迴 true 當成功時, false 否則。