Skip to content
Permalink
Browse files
[qt6][posgresql] Remove use of QSet::const_iterator operator--(), gon…
…e in qt6
  • Loading branch information
nirvn committed Jul 17, 2021
1 parent 1edf16d commit c8019573cc6a4aa0ef15bd3fdc805404cbdb76c1
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/providers/postgres/qgspostgresprovider.cpp
@@ -2672,14 +2672,14 @@ bool QgsPostgresProvider::deleteFeatures( const QgsFeatureIds &ids )
conn->begin();

QgsFeatureIds chunkIds;
QgsFeatureIds::const_iterator lastId = ids.constEnd();
--lastId;

const int countIds = ids.size();
int i = 0;
for ( QgsFeatureIds::const_iterator it = ids.constBegin(); it != ids.constEnd(); ++it )
{
// create chunks of fids to delete, the last chunk may be smaller
chunkIds.insert( *it );
if ( chunkIds.size() < 5000 && it != lastId )
i++;
if ( chunkIds.size() < 5000 && i < countIds )
continue;

const QString sql = QStringLiteral( "DELETE FROM %1 WHERE %2" )

0 comments on commit c801957

Please sign in to comment.