diff options
author | Andy Shaw <andy.shaw@digia.com> | 2012-01-19 20:39:30 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-26 06:02:13 (GMT) |
commit | b23631015c23a49e3b4d296ea0a6266bfce3d4f1 (patch) | |
tree | ebdbdf4c0102cfcc7d5461f8bfe23d413d03cb87 /src/sql/drivers/sqlite | |
parent | 1f1874293eff08db6d831f864cfbe21ddb6f753c (diff) | |
download | Qt-b23631015c23a49e3b4d296ea0a6266bfce3d4f1.zip Qt-b23631015c23a49e3b4d296ea0a6266bfce3d4f1.tar.gz Qt-b23631015c23a49e3b4d296ea0a6266bfce3d4f1.tar.bz2 |
Handle the 'real' datatype correctly in the SQLite driver
The 'real' datatype should be seen as a QVariant::Double type and not as
a QVariant::String type otherwise it does not get presented correctly
when using a non Qt application to access it.
Test is included for QSqlQuery.
Task-number: QTBUG-16373
Change-Id: Ie323ce49eb95e4d6bb4c3814ba9a957a63f4b259
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Diffstat (limited to 'src/sql/drivers/sqlite')
-rw-r--r-- | src/sql/drivers/sqlite/qsql_sqlite.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index 850108d..cc11770 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -84,6 +84,7 @@ static QVariant::Type qGetColumnType(const QString &tpName) return QVariant::Int; if (typeName == QLatin1String("double") || typeName == QLatin1String("float") + || typeName == QLatin1String("real") || typeName.startsWith(QLatin1String("numeric"))) return QVariant::Double; if (typeName == QLatin1String("blob")) |