diff options
author | David Faure <david.faure@kdab.com> | 2020-11-06 20:20:23 +0100 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2020-11-07 11:13:39 +0100 |
commit | 4f98bf713f6604903c4fe61adc750b23c4407a18 (patch) | |
tree | fbd2c6a57414a34665312b23c7b82e582df15ee3 /src/qml/jsruntime/qv4stringobject.cpp | |
parent | c1d4fcb4648fec3396081d24280fbd6cfb9adb4d (diff) |
qtdeclarative: finish fixing compilation with explicit QChar(int)
Change-Id: Idb26e2df6d4fe8940db57066a30fa8c243f6d2c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4stringobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp index e9e47c1b52..e710e14750 100644 --- a/src/qml/jsruntime/qv4stringobject.cpp +++ b/src/qml/jsruntime/qv4stringobject.cpp @@ -230,7 +230,7 @@ ReturnedValue StringCtor::method_fromCodePoint(const FunctionObject *f, const Va ++ch; *ch = QChar::lowSurrogate(cp); } else { - *ch = cp; + *ch = QChar(cp); } ++ch; } @@ -653,7 +653,7 @@ ReturnedValue StringPrototype::method_padEnd(const FunctionObject *f, const Valu toFill -= copy; ch += copy; } - *ch = 0; + *ch = '\0'; return v4->newString(padded)->asReturnedValue(); } @@ -695,7 +695,7 @@ ReturnedValue StringPrototype::method_padStart(const FunctionObject *f, const Va } memcpy(ch, original.constData(), oldLength*sizeof(QChar)); ch += oldLength; - *ch = 0; + *ch = '\0'; return v4->newString(padded)->asReturnedValue(); } |