summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-11-02 02:41:25 (GMT)
committerBill King <bill.king@nokia.com>2009-11-02 03:33:18 (GMT)
commitae576ea123d0625eceb9904e2039b2183cb82a0b (patch)
tree1d990eea867250a8aa35f3affdd5db1bb98d9dec /src/sql/drivers
parentdebc67d6183631339b910c52261a6bc7b7a7ae50 (diff)
downloadQt-ae576ea123d0625eceb9904e2039b2183cb82a0b.zip
Qt-ae576ea123d0625eceb9904e2039b2183cb82a0b.tar.gz
Qt-ae576ea123d0625eceb9904e2039b2183cb82a0b.tar.bz2
Fixes Floating point number truncation in qsqlpsql plugin under linux
replaces strtod call with locale aware QString::toDouble() Task-number: QTBUG-5179 Reviewed-by: Justin McPherson
Diffstat (limited to 'src/sql/drivers')
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 4b7c2b5..1e41571 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -357,7 +357,7 @@ QVariant QPSQLResult::data(int i)
}
return QString::fromAscii(val);
}
- return strtod(val, 0);
+ return QString::fromAscii(val).toDouble();
case QVariant::Date:
if (val[0] == '\0') {
return QVariant(QDate());