"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/providers/postgres/qgspostgresproviderconnection.cpp" between
QGIS-final-3_10_11.tar.gz and QGIS-final-3_10_12.tar.gz

About: QGIS (Quantum GIS) is a Geographic Information System that supports vector, raster, and database formats. Long-term release (3.10.x series).

qgspostgresproviderconnection.cpp  (QGIS-final-3_10_11):qgspostgresproviderconnection.cpp  (QGIS-final-3_10_12)
skipping to change at line 276 skipping to change at line 276
} }
for ( int rowIdx = 0; rowIdx < res.PQntuples(); rowIdx++ ) for ( int rowIdx = 0; rowIdx < res.PQntuples(); rowIdx++ )
{ {
QVariantList row; QVariantList row;
for ( int colIdx = 0; colIdx < res.PQnfields(); colIdx++ ) for ( int colIdx = 0; colIdx < res.PQnfields(); colIdx++ )
{ {
if ( resolveTypes ) if ( resolveTypes )
{ {
const QVariant::Type vType { typeMap.value( colIdx, QVariant::Type:: String ) }; const QVariant::Type vType { typeMap.value( colIdx, QVariant::Type:: String ) };
QVariant val { res.PQgetvalue( rowIdx, colIdx ) }; QVariant val { res.PQgetvalue( rowIdx, colIdx ) };
if ( val.canConvert( static_cast<int>( vType ) ) ) // Special case for bools: 'f' and 't'
if ( vType == QVariant::Bool )
{
val = val.toString() == 't';
}
else if ( val.canConvert( static_cast<int>( vType ) ) )
{ {
val.convert( static_cast<int>( vType ) ); val.convert( static_cast<int>( vType ) );
} }
row.push_back( val ); row.push_back( val );
} }
else else
{ {
row.push_back( res.PQgetvalue( rowIdx, colIdx ) ); row.push_back( res.PQgetvalue( rowIdx, colIdx ) );
} }
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)