summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2012-01-19 21:39:30 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-03 15:09:03 +0100
commit5bab4744bad247f3b93792f9ed4b578b0f780296 (patch)
tree3bbbd704ffb422b75763acf06a21ca3dfd78d5f1 /src/sql
parent1175ec444f2453fc773f288f1087fe6bdad340c0 (diff)
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> (cherry picked from commit b23631015c23a49e3b4d296ea0a6266bfce3d4f1) Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp1
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 a73cd0f158..962fc97dfc 100644
--- a/src/sql/drivers/sqlite/qsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp
@@ -95,6 +95,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"))