QCborParserError 结构

QCborParserError 用于 QCborValue 以报告剖析错误。 更多...

头: #include <QCborParserError>
CMake: find_package(Qt6 COMPONENTS Core REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Since: Qt 5.12

注意: 在此结构中的所有函数均 可重入 .

公共函数

QString errorString () const

公共变量

QCborError error
qint64 offset

详细描述

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

另请参阅 QCborValue and QCborError .

成员函数文档编制

QString QCborParserError:: errorString () const

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

另请参阅 QCborError::toString () 和 QCborValue::fromCbor ().

成员变量文档编制

QCborError QCborParserError:: error

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

另请参阅 QCborValue::fromCbor ().

qint64 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).

另请参阅 QCborValue::fromCbor ().