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.
- Since
- QXmpp 1.5
◆ fromFileDevice()
QXmppError QXmppError::fromFileDevice |
( |
const QFileDevice & |
file | ) |
|
|
static |
Constructs a QXmppError from a QFileDevice.
It creates a QXmppError with the error string and a QFileDevice::FileError.
◆ fromIoDevice()
QXmppError QXmppError::fromIoDevice |
( |
const QIODevice & |
device | ) |
|
|
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.
◆ fromNetworkReply()
QXmppError QXmppError::fromNetworkReply |
( |
const QNetworkReply & |
reply | ) |
|
|
static |
Constructs a QXmppError from a QNetworkReply.
It creates a QXmppError with the error string and network error from the reply.
◆ holdsType()
template<typename T >
QXmppError::holdsType |
( |
| ) |
const |
|
inline |
Returns true if the error is of type T.
◆ isFileError()
bool QXmppError::isFileError |
( |
| ) |
const |
Returns whether the error is a QNetworkReply::NetworkError.
◆ isNetworkError()
bool QXmppError::isNetworkError |
( |
| ) |
const |
Returns whether the error is a QNetworkReply::NetworkError.
◆ isStanzaError()
bool QXmppError::isStanzaError |
( |
| ) |
const |
◆ takeValue()
template<typename T >
QXmppError::takeValue |
( |
| ) |
|
|
inline |
Moves out the value if it has type T, leaves the stored error intact and returns an empty optional otherwise.
◆ value()
template<typename T >
QXmppError::value |
( |
| ) |
const |
|
inline |
Copies the value if it has type T, returns empty optional otherwise.
◆ description
Human readable description of the error.
◆ error
More specific details on the error. It may be of any type. Functions returning QXmppError should tell you which types are used.
The documentation for this class was generated from the following files: