path: root/src/plugins/sqldrivers
diff options
authorGiuseppe D'Angelo <>2019-06-23 15:12:57 +0200
committerGiuseppe D'Angelo <>2019-12-05 21:04:50 +0100
commitb19220d17fa66de5ded41690ffff263ee2af5c63 (patch)
tree03e261196dc109fbcc48a8ffbe15945a5a9c167d /src/plugins/sqldrivers
parentccef2c33b284f2fd0bc08d518398af58214b020f (diff)
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 <>
Diffstat (limited to 'src/plugins/sqldrivers')
0 files changed, 0 insertions, 0 deletions