QStringConverter: add QLatin1::convertFromUnicode() overload

Basically a convenience function for callers that don't need to specif a
state. Will be used in QDateTime in a later commit.

Change-Id: Ie4c516767195f681c89ed72e26653e75a262698c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ahmad Samir 2023-01-10 20:53:36 +02:00
parent d0408b5f13
commit 299f2a7a3f

View File

@ -50,6 +50,11 @@ struct QLatin1
}
static char *convertFromUnicode(char *out, QStringView in, QStringConverter::State *state) noexcept;
static char *convertFromUnicode(char *out, QStringView in) noexcept
{
QStringConverter::State state{QStringConverter::Flag::Stateless};
return convertFromUnicode(out, in, &state);
}
};
struct QUtf8BaseTraits