summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringconverter_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-22 22:40:56 +0200
committerLars Knoll <lars.knoll@qt.io>2020-05-14 07:47:47 +0200
commit5dcfd0ac2f3aa5c9f24022968827cc93d9839b45 (patch)
treeb3dba0c81dea438b9f9f6dc891658ce235ab4c19 /src/corelib/text/qstringconverter_p.h
parent618620bc5d82619789c9f3914f0ca3f0b1752e39 (diff)
Cleanup state handling in QUtf8::convertFromUnicode
And optimize the method so we can avoid a copy of the data. Change-Id: Ic267150db80358dbc4010bb1db2af5c0eb97dc65 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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/text/qstringconverter_p.h b/src/corelib/text/qstringconverter_p.h
index 763e3761d5..ba1db5b52c 100644
--- a/src/corelib/text/qstringconverter_p.h
+++ b/src/corelib/text/qstringconverter_p.h
@@ -289,8 +289,10 @@ struct QUtf8
static QChar *convertToUnicode(QChar *, const char *, qsizetype) noexcept;
static QString convertToUnicode(const char *, qsizetype);
static QString convertToUnicode(const char *, qsizetype, QStringConverter::State *);
+ static QChar *convertToUnicode(QChar *out, const char *in, qsizetype length, QStringConverter::State *state);
static QByteArray convertFromUnicode(const QChar *, qsizetype);
static QByteArray convertFromUnicode(const QChar *, qsizetype, QStringConverter::State *);
+ static char *convertFromUnicode(char *out, QStringView in, QStringConverter::State *state);
struct ValidUtf8Result {
bool isValidUtf8;
bool isValidAscii;