Skip to content
Permalink
Browse files
Extra fixes related to truncation of feature count
  • Loading branch information
rouault authored and nyalldawson committed Jun 15, 2021
1 parent 53ca5b2 commit d482bc06b17ed795867ee41ebd4319ce610e3e4e
@@ -73,7 +73,7 @@ comparing the index of the current ``layer`` to the total amount
``numLayers``.
%End

void progressModeSet( QgsOfflineEditing::ProgressMode mode, int maximum );
void progressModeSet( QgsOfflineEditing::ProgressMode mode, long long maximum );
%Docstring
Emitted when the mode for the progress of the current operation is
set.
@@ -82,7 +82,7 @@ set.
:param maximum: total number of entities to process in the current operation
%End

void progressUpdated( int progress );
void progressUpdated( long long progress );
%Docstring
Emitted with the progress of the current mode

@@ -1298,7 +1298,7 @@ QVariantMap QgsMeshExportCrossSection::processAlgorithm( const QVariantMap &para
QgsFeature feat;
while ( featIt.nextFeature( feat ) )
{
int fid = feat.id();
QgsFeatureId fid = feat.id();
QgsGeometry line = feat.geometry();
try
{
@@ -1359,7 +1359,7 @@ QVariantMap QgsMeshExportCrossSection::processAlgorithm( const QVariantMap &para

if ( feedback )
{
feedback->setProgress( 100 * featCounter / featCount );
feedback->setProgress( 100.0 * featCounter / featCount );
if ( feedback->isCanceled() )
return QVariantMap();
}
@@ -1609,13 +1609,13 @@ QVariantMap QgsMeshExportTimeSeries::processAlgorithm( const QVariantMap &parame

textStream << header.join( ',' ) << QStringLiteral( "\n" );

int featCount = featureSource->featureCount();
int featCounter = 0;
long long featCount = featureSource->featureCount();
long long featCounter = 0;
QgsFeatureIterator featIt = featureSource->getFeatures();
QgsFeature feat;
while ( featIt.nextFeature( feat ) )
{
int fid = feat.id();
QgsFeatureId fid = feat.id();
QgsGeometry geom = feat.geometry();
try
{
@@ -1709,7 +1709,7 @@ QVariantMap QgsMeshExportTimeSeries::processAlgorithm( const QVariantMap &parame
featCounter++;
if ( feedback )
{
feedback->setProgress( 100 * featCounter / featCount );
feedback->setProgress( 100.0 * featCounter / featCount );
if ( feedback->isCanceled() )
return QVariantMap();
}
@@ -851,7 +851,7 @@ QgsVectorLayer *QgsOfflineEditing::copyVectorLayer( QgsVectorLayer *layer, sqlit
{
emit progressModeSet( QgsOfflineEditing::CopyFeatures, layer->dataProvider()->featureCount() );
}
int featureCount = 1;
long long featureCount = 1;

QList<QgsFeatureId> remoteFeatureIds;
while ( fit.nextFeature( f ) )
@@ -95,13 +95,13 @@ class CORE_EXPORT QgsOfflineEditing : public QObject
* \param mode progress mode
* \param maximum total number of entities to process in the current operation
*/
void progressModeSet( QgsOfflineEditing::ProgressMode mode, int maximum );
void progressModeSet( QgsOfflineEditing::ProgressMode mode, long long maximum );

/**
* Emitted with the progress of the current mode
* \param progress current index of processed entities
*/
void progressUpdated( int progress );
void progressUpdated( long long progress );

//! Emitted when the processing of all layers has finished
void progressStopped();
@@ -343,7 +343,7 @@ class GUI_EXPORT QgsAttributeTableModel: public QAbstractTableModel

QHash<QgsFeatureId, int> mIdRowMap;
QHash<int, QgsFeatureId> mRowIdMap;
mutable QHash<int, QList<QgsConditionalStyle> > mRowStylesMap;
mutable QHash<QgsFeatureId, QList<QgsConditionalStyle> > mRowStylesMap;

mutable QgsExpressionContext mExpressionContext;

@@ -1065,7 +1065,7 @@ void TestQgsGeometryChecks::testSelfIntersectionCheck()
// Test fixes
QgsFeature f;

int nextId = testContext.second[errs1[0]->layerId()]->layer()->featureCount();
QgsFeatureId nextId = testContext.second[errs1[0]->layerId()]->layer()->featureCount();
QVERIFY( fixCheckError( testContext.second, errs1[0],
QgsGeometrySelfIntersectionCheck::ToSingleObjects, QgsGeometryCheckError::StatusFixed,
{

0 comments on commit d482bc0

Please sign in to comment.