4#ifndef QSTRINGCONVERTER_BASE_H
5#define QSTRINGCONVERTER_BASE_H
9#pragma qt_sync_stop_processing
14#include <QtCore/qglobal.h>
15#include <QtCore/qflags.h>
41 :
flags(
f), state_data{0, 0, 0, 0} {}
46 remainingChars(
other.remainingChars),
47 invalidChars(
other.invalidChars),
48 state_data{
other.state_data[0],
other.state_data[1],
50 clearFn(
other.clearFn)
51 {
other.clearFn =
nullptr; }
56 remainingChars =
other.remainingChars;
57 invalidChars =
other.invalidChars;
58 std::memmove(state_data,
other.state_data,
sizeof state_data);
59 clearFn =
other.clearFn;
60 other.clearFn =
nullptr;
63 Q_CORE_EXPORT
void clear() noexcept;
64 Q_CORE_EXPORT
void reset() noexcept;
106 ConvertInvalidToNull = 0x2,
108 ConvertInitialBom = 0x8,
146 bool isValid() const noexcept {
return iface !=
nullptr; }
154 Q_CORE_EXPORT
const char *
name() const noexcept;
156 Q_CORE_EXPORT static
std::optional<Encoding> encodingForName(const
char *
name) noexcept;
157 Q_CORE_EXPORT static const
char *nameForEncoding(Encoding
e);
158 Q_CORE_EXPORT static
std::optional<Encoding>
166 Q_CORE_EXPORT static const
Interface encodingInterfaces[
Encoding::LastEncoding + 1];
LEInquiryState internalState
~QStringConverterBase()=default
bool hasError() const noexcept
Returns true if a conversion could not correctly convert a character.
constexpr QStringConverter(Encoding encoding, Flags f)
QStringConverter(QStringConverter &&)=default
bool isValid() const noexcept
Returns true if this is a valid string converter that can be used for encoding or decoding text.
void resetState() noexcept
Resets the internal state of the converter, clearing potential errors or partial conversions.
~QStringConverter()=default
Encoding
\value Utf8 Create a converter to or from UTF-8 \value Utf16 Create a converter to or from UTF-16.
constexpr QStringConverter(const Interface *i) noexcept
QStringConverter & operator=(QStringConverter &&)=default
constexpr QStringConverter() noexcept
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
static QT_BEGIN_NAMESPACE const uint Default
static qsizetype toUtf16Len(qsizetype l)
static qsizetype fromUtf16Len(qsizetype l)
QTextStream out(stdout)
[7]
void(*)(State *) noexcept ClearDataFn
State & operator=(State &&other) noexcept
State(State &&other) noexcept
constexpr State(Flags f=Flag::Default) noexcept
QChar *(*)(QChar *out, QByteArrayView in, State *state) DecoderFn
qsizetype(*)(qsizetype inLength) LengthFn
char *(*)(char *out, QStringView in, State *state) EncoderFn