summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringconverter_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-23 16:44:38 +0200
committerLars Knoll <lars.knoll@qt.io>2020-05-14 07:48:07 +0200
commit4b2edde373675e80d0db90b8f724fe0607e95f27 (patch)
treec7ff5f91f7964370937fd44845833c95eb117eff /src/corelib/text/qstringconverter_p.h
parentb1d8ce32cd4dc7dc021aa9f0c05048753f04dd6c (diff)
Cleanup QUtf32::convertToUnicode
Cleanup the implementation and improve performance by handling the first char outside of the main loop. Also avoid one copy of the data when using QStringConverter. Change-Id: Ie698e62de1864352612a4dddc907cb139e7e6407 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qstringconverter_p.h')
-rw-r--r--src/corelib/text/qstringconverter_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/text/qstringconverter_p.h b/src/corelib/text/qstringconverter_p.h
index a579a362ff..23e7b60a76 100644
--- a/src/corelib/text/qstringconverter_p.h
+++ b/src/corelib/text/qstringconverter_p.h
@@ -312,9 +312,10 @@ struct QUtf16
struct QUtf32
{
+ static QChar *convertToUnicode(QChar *out, const char *chars, qsizetype len, QStringConverter::State *state, DataEndianness endian);
static QString convertToUnicode(const char *, qsizetype, QStringConverter::State *, DataEndianness = DetectEndianness);
static QByteArray convertFromUnicode(const QChar *, qsizetype, QStringConverter::State *, DataEndianness = DetectEndianness);
- static char *convertFromUnicode(char *out, const QChar *uc, qsizetype len, QStringConverter::State *state, DataEndianness endian);
+ static char *convertFromUnicode(char *out, QStringView in, QStringConverter::State *state, DataEndianness endian);
};
struct QLocal8Bit