Make QString("inf").toFloat() return inf instead of zero.
authorMitch Curtis <mitch.curtis@nokia.com>
Wed, 30 May 2012 14:56:20 +0000 (16:56 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 5 Jun 2012 04:14:57 +0000 (06:14 +0200)
commit872f0b94ac7a863c59bf1175b94cca3b3636cf13
tree41951b0fd58977349f6a621c487de0cd0bbb6a8c
parent93ead3593997f9b67868170aa0f876eec30d3130
Make QString("inf").toFloat() return inf instead of zero.

Currently, QString::toFloat() returns 0 (and sets ok to false) if you
try to convert "inf". This is because inf is greater than QT_MAX_FLOAT
and there is currently no check to handle inf.

Task-number: QTBUG-8629
Change-Id: I498daf4a7a6f880f928461fca628fcaf7d1d6d08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
src/corelib/tools/qstring.cpp
tests/auto/corelib/tools/qstring/tst_qstring.cpp