Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QCborParserError Class Reference

\inmodule QtCore\reentrant More...

#include <qcborvalue.h>

+ Collaboration diagram for QCborParserError:

Public Member Functions

QString errorString () const
 \variable QCborParserError::offset
 

Public Attributes

qint64 offset = 0
 
QCborError error = { QCborError::NoError }
 

Detailed Description

\inmodule QtCore

\reentrant

Since
5.12

The QCborParserError is used by QCborValue to report a parsing error.

This class is used by \l {QCborValue::fromCbor(const QByteArray &ba, QCborParserError *error)} to report a parser error and the byte offset where the error was detected.

See also
QCborValue, QCborError

Definition at line 36 of file qcborvalue.h.

Member Function Documentation

◆ errorString()

QString QCborParserError::errorString ( ) const
inline

\variable QCborParserError::offset

This field contains the offset from the beginning of the data where the error was detected. The offset should point to the beginning of the item that contained the error, even if the error itself was elsewhere (for example, for UTF-8 decoding issues).

See also
QCborValue::fromCbor()

\variable QCborParserError::error

This field contains the error code that indicates what decoding problem was found.

See also
QCborValue::fromCbor()

Returns a string representation of the error code. This string is not translated.

See also
QCborError::toString(), QCborValue::fromCbor()

Definition at line 41 of file qcborvalue.h.

References error, and QCborError::toString().

Referenced by QQuickSplitView::restoreState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ error

QCborError QCborParserError::error = { QCborError::NoError }

Definition at line 39 of file qcborvalue.h.

Referenced by errorString(), and QQuickSplitView::restoreState().

◆ offset

qint64 QCborParserError::offset = 0

Definition at line 38 of file qcborvalue.h.


The documentation for this class was generated from the following files: