qt5base-lts/tests/auto/corelib/text/qbytearray
Giuseppe D'Angelo b19220d17f QByteArray: add a strict mode to fromBase64
QByteArray::fromBase64 was liberal in its input, simply skipping
over invalid characters. As a side-effect of this, it had
no error reporting, meaning it could not be used to convert
fromBase64 _and_ validate the input in one go.

Add more option flags to make fromBase64 strictly validate
its input. Since we want to know whether it has succeeded
or not, and the existing fromBase64 overloads do not
allow for that, introduce a new function that returns
an optional-like datatype.

While at it: base64 decoding can be done in-place; add an
rvalue overload to enable this use case.

[ChangeLog][QtCore][QByteArray] Added the new fromBase64Encoding
function.

[ChangeLog][QtCore][QByteArray] Added new flags to make
fromBase64 / fromBase64Encoding strictly validate their input,
instead of skipping over invalid characters.

Change-Id: I99cd5f2230f3d62970b28b4cb102913301da6ccd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-05 21:04:50 +01:00
..
.gitattributes Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
.gitignore Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
android_testdata.qrc Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qbytearray.pro Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
rfc3252.txt Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
tst_qbytearray_mac.mm Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
tst_qbytearray.cpp QByteArray: add a strict mode to fromBase64 2019-12-05 21:04:50 +01:00