QCborParserError Struct
QCborValue 使用 QCborParserError 报告解析错误。更多
Header: | #include <QCborParserError> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
- 所有成员(包括继承成员)的列表
- QCborParserError 是Qt 中 CBOR 支持的一部分。
注意:该结构中的所有函数都是可重入的。
公共函数
QString | errorString() const |
公共变量
详细说明
QCborValue::fromCbor(const QByteArray &ba, QCborParserError *error) 使用该类报告解析器错误以及检测到错误的字节偏移。
另请参阅 QCborValue 和QCborError 。
成员函数文档
QString QCborParserError::errorString() const
返回错误代码的字符串。该字符串不会被翻译。
另请参阅 QCborError::toString() 和QCborValue::fromCbor()。
成员变量文档
QCborError QCborParserError::error
该字段包含错误代码,表示发现了什么解码问题。
另请参见 QCborValue::fromCbor()。
qint64 QCborParserError::offset
该字段包含从检测到错误的数据开头开始的偏移量。偏移量应指向包含错误的项目开头,即使错误本身在其他地方(例如,UTF-8 解码问题)。
另请参见 QCborValue::fromCbor()。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.