diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-02 11:36:43 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-02 11:36:54 (GMT) |
commit | e403fd643f5b7cdd215689b566067c19cf70b4c3 (patch) | |
tree | b43d23bf0cc7b93b1867efe4c2377d82137aed9f /src/sql/drivers | |
parent | 1d440cf00ded21432ca4be36bf5be60bbddf87d1 (diff) | |
parent | 016c06f8988c50f0f8309b1b5054ea99ecd1bc6c (diff) | |
download | Qt-e403fd643f5b7cdd215689b566067c19cf70b4c3.zip Qt-e403fd643f5b7cdd215689b566067c19cf70b4c3.tar.gz Qt-e403fd643f5b7cdd215689b566067c19cf70b4c3.tar.bz2 |
Merge origin/4.6 into team-widgets/4.6
Diffstat (limited to 'src/sql/drivers')
-rw-r--r-- | src/sql/drivers/psql/qsql_psql.cpp | 2 | ||||
-rw-r--r-- | src/sql/drivers/sqlite/qsql_sqlite.cpp | 6 |
2 files changed, 2 insertions, 6 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()); diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index 2766cca..8355de2 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -228,13 +228,9 @@ bool QSQLiteResultPrivate::fetchNext(QSqlCachedResult::ValueCache &values, int i values[i + idx] = sqlite3_column_int64(stmt, i); break; case QSql::LowPrecisionDouble: - values[i + idx] = sqlite3_column_double(stmt, i); - break; case QSql::HighPrecision: default: - values[i + idx] = QString::fromUtf16(static_cast<const ushort *>( - sqlite3_column_text16(stmt, i)), - sqlite3_column_bytes16(stmt, i) / sizeof(ushort)); + values[i + idx] = sqlite3_column_double(stmt, i); break; }; break; |