mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Saver attribute map handling (no insertion of additional entry if a column does not exist)
git-svn-id: http://svn.osgeo.org/qgis/trunk@15388 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
dce9d141ec
commit
caa0cae3b9
@ -1902,7 +1902,13 @@ void QgsOgrProvider::uniqueValues( int index, QList<QVariant> &uniqueValues, int
|
||||
|
||||
QVariant QgsOgrProvider::minimumValue( int index )
|
||||
{
|
||||
QgsField fld = mAttributeFields[index];
|
||||
QgsFieldMap::const_iterator attIt = mAttributeFields.find( index );
|
||||
if ( attIt == mAttributeFields.constEnd() )
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
const QgsField& fld = attIt.value();
|
||||
|
||||
QString theLayerName = OGR_FD_GetName( OGR_L_GetLayerDefn( ogrLayer ) );
|
||||
|
||||
QString sql = QString( "SELECT MIN(%1) FROM %2" )
|
||||
@ -1936,7 +1942,13 @@ QVariant QgsOgrProvider::minimumValue( int index )
|
||||
|
||||
QVariant QgsOgrProvider::maximumValue( int index )
|
||||
{
|
||||
QgsField fld = mAttributeFields[index];
|
||||
QgsFieldMap::const_iterator attIt = mAttributeFields.find( index );
|
||||
if ( attIt == mAttributeFields.constEnd() )
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
const QgsField& fld = mAttributeFields[index];
|
||||
|
||||
QString theLayerName = OGR_FD_GetName( OGR_L_GetLayerDefn( ogrLayer ) );
|
||||
|
||||
QString sql = QString( "SELECT MAX(%1) FROM %2" )
|
||||
|
Loading…
x
Reference in New Issue
Block a user