6.0.0-rc4Source

QStringConverterBase Class

The QStringConverterBase class provides the flags shared by the string converters. More…

Header#include <QStringConverterBase>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes
Since6.0
Inherited byQStringConverter

List of all members, including inherited members

Public Types

enumFlag
typedefFlags

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

ConstantDescription
QStringConverterBase::DefaultByte 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::StatelessEach 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::ConvertInvalidToNullInvalid input is converted to U+0000 (or a null byte) instead of the replacement character.
QStringConverterBase::WriteBomEncoders write a byte order mark before the first encoded character.
QStringConverterBase::ConvertInitialBomDecoders keep a byte order mark at the start of the data as U+FEFF instead of skipping it.
QStringConverterBase::UsesIcuAccepted 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.