Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.1
-
None
-
a9923674030980706940b3ee11145c38674bb35d (qt/qtbase/5.11)
Description
#include <QCoreApplication> #include <QLocale> #include <QString> #include <QDebug> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QLocale c(QLocale::C); bool ok; QString str = "1.7976931348623157e309"; qDebug() << c.toDouble(str, &ok) << ok; // print "inf false" return a.exec(); }
From documentation: "Returns the double represented by the localized string s, or 0.0 if the conversion failed."
In Qt4 the same code prints "0 false"