2 Attachment(s)
QVariant not returning proper type for SQLite REAL
I setup a table with columns that use type REAL, such as "TimestampNumeric" When I query this table using model.record().field(columnIndex).type the QVariant type is 10, which is String. This is incorrect, it should be returning QVariant::Double.
This does work correctly with SQLite type INT however.
Within C++, if I use "PRAGMA table_info(tableName);" as a query on SQLite, it returns REAL as it obviously should.
See the screenshots for this bug:
Re: QVariant not returning proper type for SQLite REAL
This is a bug in QT, in qsql_sqlite.cpp
Code:
{
const QString typeName = tpName.
toLower();
}
It does not account for REAL, although according to the sql documentation, float and doubles are not types, only real is.
http://www.sqlite.org/datatype3.html