Correct character semantics documentation in QByteArray(View)

QByteArray's list of case-implicating functions included three that
don't implicate case and omitted one that does. QByteArrayView lacked
any mention of the liminal nature of these and other methods that
presume any particular semantics to character data.

Pick-to: 6.2 6.3
Change-Id: I928ef2274704584f8a137c0a4a7aa3c3da57718e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Edward Welbourne 2022-01-31 13:57:37 +01:00
parent 479c95729a
commit d854534789
2 changed files with 9 additions and 3 deletions

View File

@ -929,8 +929,8 @@ QByteArray qUncompress(const uchar* data, qsizetype nbytes)
comparison is limited to ASCII. Non-ASCII characters are treated as
caseless, since their case depends on encoding. This affects functions that
support a case insensitive option or that change the case of their
arguments. Functions that this affects include contains(), indexOf(),
lastIndexOf(), isLower(), isUpper(), toLower() and toUpper().
arguments. Functions that this affects include compare(), isLower(),
isUpper(), toLower() and toUpper().
This issue does not apply to \l{QString}s since they represent characters
using Unicode.

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@ -80,6 +80,12 @@
If in doubt, obtain a strong reference to the data by calling toByteArray() to convert
the QByteArrayView into a QByteArray.
The methods supported by QByteArrayView reflect those of \l QByteArray. In
particular, to the limited degree that it ascribes semantics (such as
character case, spacing, digits of numbers) to the character data viewed, it
uses the C locale and ASCII encoding. See \l {C locale and ASCII functions}
for details and the limitations on these methods.
\section1 Compatible Byte Types
QByteArrayView can be constructed on any container of bytes, where the byte type