qt5base-lts/tests/auto/corelib/text
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
..
qbytearray QByteArray: add a strict mode to fromBase64 2019-12-05 21:04:50 +01:00
qbytearraylist Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qbytearraymatcher Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qbytedatabuffer Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qchar Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qcollator Move a test for feature ICU from .pro to .cpp 2019-10-25 11:41:30 +02:00
qlatin1string Deprecate QStringViewLiteral 2019-08-10 22:13:49 +02:00
qlocale Deprecate constructing QFlags from a pointer 2019-11-20 19:43:38 +01:00
qregexp Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qregularexpression Avoid initializing QFlags with 0 or nullptr in tests 2019-11-26 09:08:51 +01:00
qstring Don't try to define QT_NO_CAST_TO_ASCII when the test undefines it 2019-10-25 11:41:44 +02:00
qstring_no_cast_from_bytearray Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringapisymmetry Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringbuilder Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringiterator Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringlist Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringmatcher Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringref Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringview Deprecate QStringViewLiteral 2019-08-10 22:13:49 +02:00
qtextboundaryfinder Update UCD data to Unicode 12.1.0's Revision 24 2019-10-30 17:38:02 +01:00
text.pro Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00