|
QXmpp Version: 1.15.1
|
Public Member Functions | |
| bool | isFileError () const |
| bool | isNetworkError () const |
| bool | isStanzaError () const |
| template<typename T> | |
| bool | holdsType () const |
| template<typename T> | |
| std::optional< T > | value () const |
| template<typename T> | |
| std::optional< T > | takeValue () |
Static Public Member Functions | |
| static QXmppError | fromIoDevice (const QIODevice &device) |
| static QXmppError | fromNetworkReply (const QNetworkReply &reply) |
| Constructs a QXmppError from a QNetworkReply. | |
| static QXmppError | fromFileDevice (const QFileDevice &file) |
| Constructs a QXmppError from a QFileDevice. | |
Public Attributes | |
| QString | description |
| std::any | error |
Generic error class holding a description and a more specific error object. The specific error usually is something like a QXmppStanza::Error or an enum.
|
static |
Constructs a QXmppError from a QFileDevice.
It creates a QXmppError with the error string and a QFileDevice::FileError.
|
static |
Constructs a QXmppError from an QIODevice
It tries to cast the IO device to different known IO devices to get a useful more specific error, i.e. it returns a QXmppError with QFileDevice::FileError for QFileDevices.
|
static |
Constructs a QXmppError from a QNetworkReply.
It creates a QXmppError with the error string and network error from the reply.
|
inline |
Returns true if the error is of type T.
| bool QXmppError::isFileError | ( | ) | const |
Returns whether the error is a QNetworkReply::NetworkError.
| bool QXmppError::isNetworkError | ( | ) | const |
Returns whether the error is a QNetworkReply::NetworkError.
| bool QXmppError::isStanzaError | ( | ) | const |
Returns whether the error is a QXmppStanza::Error.
|
inline |
Moves out the value if it has type T, leaves the stored error intact and returns an empty optional otherwise.
|
inline |
Copies the value if it has type T, returns empty optional otherwise.
| QString QXmppError::description |
Human readable description of the error.
| std::any QXmppError::error |
More specific details on the error. It may be of any type. Functions returning QXmppError should tell you which types are used.