File tree Expand file tree Collapse file tree 3 files changed +13
-19
lines changed Expand file tree Collapse file tree 3 files changed +13
-19
lines changed Original file line number Diff line number Diff line change @@ -462,27 +462,22 @@ void QgsVectorLayerEditBuffer::rollBack()
462
462
Q_ASSERT ( mAddedFeatures .isEmpty () );
463
463
}
464
464
465
-
466
-
467
-
468
-
469
- /* QString QgsVectorLayerEditBuffer::dumpEditBuffer()
465
+ #if 0
466
+ QString QgsVectorLayerEditBuffer::dumpEditBuffer()
470
467
{
471
468
QString msg;
472
- if (!mChangedGeometries.isEmpty())
469
+ if ( !mChangedGeometries.isEmpty() )
473
470
{
474
471
msg += "CHANGED GEOMETRIES:\n";
475
- for (QgsGeometryMap::const_iterator it = mChangedGeometries.begin(); it != mChangedGeometries.end(); ++it)
472
+ for ( QgsGeometryMap::const_iterator it = mChangedGeometries.begin(); it != mChangedGeometries.end(); ++it )
476
473
{
477
474
// QgsFeatureId, QgsGeometry
478
- msg += QString("- FID %1: %2").arg(it.key()).arg(it.value().to)
475
+ msg += QString( "- FID %1: %2" ).arg( it.key() ).arg( it.value().to );
479
476
}
480
477
}
481
478
return msg;
482
- }*/
483
-
484
-
485
-
479
+ }
480
+ #endif
486
481
487
482
void QgsVectorLayerEditBuffer::handleAttributeAdded ( int index )
488
483
{
Original file line number Diff line number Diff line change @@ -1509,11 +1509,6 @@ bool QgsOracleProvider::addAttributes( const QList<QgsField> &attributes )
1509
1509
return returnvalue;
1510
1510
}
1511
1511
1512
- static int moreThan ( int a, int b )
1513
- {
1514
- return a > b;
1515
- }
1516
-
1517
1512
bool QgsOracleProvider::deleteAttributes ( const QgsAttributeIds& ids )
1518
1513
{
1519
1514
bool returnvalue = true ;
@@ -1535,7 +1530,8 @@ bool QgsOracleProvider::deleteAttributes( const QgsAttributeIds& ids )
1535
1530
qry.finish ();
1536
1531
1537
1532
QList<int > idsList = ids.values ();
1538
- qSort ( idsList.begin (), idsList.end (), moreThan );
1533
+ qSort ( idsList.begin (), idsList.end (), qGreater<int >() );
1534
+
1539
1535
foreach ( int id, idsList )
1540
1536
{
1541
1537
const QgsField &fld = mAttributeFields .at ( id );
Original file line number Diff line number Diff line change @@ -1926,7 +1926,10 @@ bool QgsPostgresProvider::deleteAttributes( const QgsAttributeIds& ids )
1926
1926
{
1927
1927
mConnectionRW ->PQexecNR ( " BEGIN" );
1928
1928
1929
- for ( QgsAttributeIds::const_iterator iter = ids.begin (); iter != ids.end (); ++iter )
1929
+ QList<int > idsList = ids.values ();
1930
+ qSort ( idsList.begin (), idsList.end (), qGreater<int >() );
1931
+
1932
+ for ( QList<int >::const_iterator iter = idsList.begin (); iter != idsList.end (); ++iter )
1930
1933
{
1931
1934
int index = *iter;
1932
1935
if ( index < 0 || index >= mAttributeFields .count () )
You can’t perform that action at this time.
0 commit comments