Replace uses of QString::fromUtf16(ushort*) with (char16_t*)
Ditto fromUcs4(uint*) with fromUcs4(char32_t*). The ushort/uint forms will be deprecated. Change-Id: Ia4ce45ed8679951b24af13109e3e498f51fc3c89 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
90ad722fb2
commit
c3d2e0e60a
@ -2193,9 +2193,9 @@ QString qt_normalizePathSegments(const QString &name, QDirPrivate::PathNormaliza
|
||||
return name;
|
||||
|
||||
int i = len - 1;
|
||||
QVarLengthArray<ushort> outVector(len);
|
||||
QVarLengthArray<char16_t> outVector(len);
|
||||
int used = len;
|
||||
ushort *out = outVector.data();
|
||||
char16_t *out = outVector.data();
|
||||
const ushort *p = name.utf16();
|
||||
const ushort *prefix = p;
|
||||
int up = 0;
|
||||
|
@ -1492,8 +1492,8 @@ QStringList QRegularExpression::namedCaptureGroups() const
|
||||
result.append(QString());
|
||||
|
||||
for (unsigned int i = 0; i < namedCapturingTableEntryCount; ++i) {
|
||||
const ushort * const currentNamedCapturingTableRow =
|
||||
reinterpret_cast<const ushort *>(namedCapturingTable) + namedCapturingTableEntrySize * i;
|
||||
const auto currentNamedCapturingTableRow =
|
||||
reinterpret_cast<const char16_t *>(namedCapturingTable) + namedCapturingTableEntrySize * i;
|
||||
|
||||
const int index = *currentNamedCapturingTableRow;
|
||||
result[index] = QString::fromUtf16(currentNamedCapturingTableRow + 1);
|
||||
|
@ -1168,8 +1168,8 @@ QT_WARNING_POP
|
||||
|
||||
inline QString QString::fromWCharArray(const wchar_t *string, int size)
|
||||
{
|
||||
return sizeof(wchar_t) == sizeof(QChar) ? fromUtf16(reinterpret_cast<const ushort *>(string), size)
|
||||
: fromUcs4(reinterpret_cast<const uint *>(string), size);
|
||||
return sizeof(wchar_t) == sizeof(QChar) ? fromUtf16(reinterpret_cast<const char16_t *>(string), size)
|
||||
: fromUcs4(reinterpret_cast<const char32_t *>(string), size);
|
||||
}
|
||||
|
||||
inline QString::QString() noexcept {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user