spatialite provider: load 64bit integers (fixes #12785)

This commit is contained in:
Juergen E. Fischer 2015-06-09 23:12:27 +02:00
parent 014f0703fe
commit b736317005

View File

@ -368,10 +368,18 @@ bool QgsSpatiaLiteFeatureIterator::getFeature( sqlite3_stmt *stmt, QgsFeature &f
QVariant QgsSpatiaLiteFeatureIterator::getFeatureAttribute( sqlite3_stmt* stmt, int ic, const QVariant::Type& type )
{
if ( sqlite3_column_type( stmt, ic ) == SQLITE_INTEGER )
{
if ( type == QVariant::Int )
{
// INTEGER value
return sqlite3_column_int( stmt, ic );
}
else
{
// INTEGER value
return ( qint64 ) sqlite3_column_int64( stmt, ic );
}
}
if ( sqlite3_column_type( stmt, ic ) == SQLITE_FLOAT )
{