QStringConverterBase Class
The QStringConverterBase class provides the flags shared by the string converters. More…
| Header | #include <QStringConverterBase> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
| Since | 6.0 |
| Inherited by | QStringConverter |
List of all members, including inherited members
Public Types
Detailed Description
QStringConverterBase is the base class of QStringConverter. It holds the Flag enum, which controls how byte order marks and invalid input are handled.
See also QStringEncoder and QStringDecoder.
Differences from Qt
The State structure is not part of the API; each converter keeps its state privately. Flag::UsesIcu is accepted but ignored.
Member Type Documentation
enum QStringConverterBase::Flag
| Constant | Description |
|---|---|
QStringConverterBase::Default | Byte order marks at the start of decoded data are skipped, encoders do not write one, and invalid input is replaced by the replacement character. |
QStringConverterBase::Stateless | Each call converts its input on its own: an incomplete sequence at the end of the input is treated as invalid instead of being kept for the next call. |
QStringConverterBase::ConvertInvalidToNull | Invalid input is converted to U+0000 (or a null byte) instead of the replacement character. |
QStringConverterBase::WriteBom | Encoders write a byte order mark before the first encoded character. |
QStringConverterBase::ConvertInitialBom | Decoders keep a byte order mark at the start of the data as U+FEFF instead of skipping it. |
QStringConverterBase::UsesIcu | Accepted for compatibility; Nt does not use ICU. |
typedef QStringConverterBase::Flags
The Flags type is a typedef for QFlags<Flag>. It stores an OR combination of Flag values.