Skip to content

Commit

Permalink
Add missing proxy calls for QgsProcessingFeatureSource, causing
Browse files Browse the repository at this point in the history
inefficient base class methods to be used instead.
  • Loading branch information
nyalldawson committed Dec 8, 2017
1 parent be962c7 commit 3a5caaf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/core/processing/qgsprocessingutils.sip
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ class QgsProcessingFeatureSource : QgsFeatureSource

virtual QVariant maximumValue( int fieldIndex ) const;

virtual QgsRectangle sourceExtent() const;

virtual QgsFeatureIds allFeatureIds() const;


QgsExpressionContextScope *createExpressionContextScope() const /Factory/;
%Docstring
Expand Down
10 changes: 10 additions & 0 deletions src/core/processing/qgsprocessingutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,16 @@ QVariant QgsProcessingFeatureSource::maximumValue( int fieldIndex ) const
return mSource->maximumValue( fieldIndex );
}

QgsRectangle QgsProcessingFeatureSource::sourceExtent() const
{
return mSource->sourceExtent();
}

QgsFeatureIds QgsProcessingFeatureSource::allFeatureIds() const
{
return mSource->allFeatureIds();
}

QgsExpressionContextScope *QgsProcessingFeatureSource::createExpressionContextScope() const
{
QgsExpressionContextScope *expressionContextScope = nullptr;
Expand Down
2 changes: 2 additions & 0 deletions src/core/processing/qgsprocessingutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ class CORE_EXPORT QgsProcessingFeatureSource : public QgsFeatureSource
QSet<QVariant> uniqueValues( int fieldIndex, int limit = -1 ) const override;
QVariant minimumValue( int fieldIndex ) const override;
QVariant maximumValue( int fieldIndex ) const override;
QgsRectangle sourceExtent() const override;
QgsFeatureIds allFeatureIds() const override;

/**
* Returns an expression context scope suitable for this source.
Expand Down

0 comments on commit 3a5caaf

Please sign in to comment.