summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/code
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-11-04 12:01:08 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-11-04 17:32:12 +0000
commit59dbf1786f22ec4ac88d8f9d38cac5cfb82acaea (patch)
treee0e73b31a47cb5f9eb497945727d54a7e55ff445 /src/widgets/doc/snippets/code
parenta926f675be220ca6020039ac3640991b63a0fae7 (diff)
QLocale: Return overflowing numbers from asciiToDouble()
The behavior from before libdouble-conversion is that in case of an overflow the OK flag is set to false, but the returned number is still infinity, rather than 0. Also, the number of processed characters is always set to the number of characters actually processed, unless garbage is found. There is an important distinction between an overflow and garbage. The client code may accept overflows and infinity may be a valid result. Garbage is most certainly not acceptable. Having an infinity/false result in addition to 0/false allows the client code to distinguish those. One application where this is useful is parsing JavaScript. Change-Id: I4b8581568144b44fca3353c4bd9685c702762af9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions