diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2022-04-14 19:29:40 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2022-04-28 08:40:19 +0000 |
| commit | e48b4d2b7c1d99ba8962a9c10a1508d16dc33fbf (patch) | |
| tree | 520952b109a14e1bbddf51771b6ae6602ba3a614 /src/sql/kernel/qsqldriverplugin.cpp | |
| parent | 7a5d7e8440a1e4beec49b751d0ecacdf55aa45d5 (diff) | |
Implement support for '0b' prefix in toInt() etc
[ChangeLog][QtCore][QByteArray/QByteArrayView/QLatin1String/QString/QStringView]
The string-to-integer conversion functions (toInt() etc) now support
the 0b prefix for binary literals. That means that base = 0 will
recognize 0b to mean base = 2 and an explicit base = 2 argument will
make toInt() (etc) skip an optional 0b.
[ChangeLog][QtCore][Important Behavior Changes] Due to the
newly-introduced support for 0b (binary) prefixes in integer parsing,
some strings that were previously rejected as invalid now parse as
valid. E.g., Qt 6.3 with autodetected bases would have tried to parse
"0b1" as an octal value and fail, whereas 6.4 will parse it as the
binary literal and return 1.
Fixes: QTBUG-85002
Change-Id: Id4eff72d63619080e5afece4d059b6ffd52f28c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/sql/kernel/qsqldriverplugin.cpp')
0 files changed, 0 insertions, 0 deletions
