Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use a QgsMapLayerStore instead of whole QgsProject for
temporary layer storage in QgsProcessingContext
  • Loading branch information
nyalldawson committed May 2, 2017
1 parent 10b1896 commit 348c886
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions python/core/processing/qgsprocessingcontext.sip
Expand Up @@ -75,11 +75,11 @@ class QgsProcessingContext
Sets the expression ``context``.
%End

QgsProject &temporaryLayerStore();
QgsMapLayerStore &temporaryLayerStore();
%Docstring
Returns a reference to the project used for storing temporary layers during
Returns a reference to the layer store used for storing temporary layers during
algorithm execution.
:rtype: QgsProject
:rtype: QgsMapLayerStore
%End

QgsFeatureRequest::InvalidGeometryCheck invalidGeometryCheck() const;
Expand Down
6 changes: 3 additions & 3 deletions src/core/processing/qgsprocessingcontext.h
Expand Up @@ -90,10 +90,10 @@ class CORE_EXPORT QgsProcessingContext
void setExpressionContext( const QgsExpressionContext &context ) { mExpressionContext = context; }

/**
* Returns a reference to the project used for storing temporary layers during
* Returns a reference to the layer store used for storing temporary layers during
* algorithm execution.
*/
QgsProject &temporaryLayerStore() { return tempProject; }
QgsMapLayerStore &temporaryLayerStore() { return tempLayerStore; }

/**
* Returns the behavior used for checking invalid geometries in input layers.
Expand Down Expand Up @@ -147,7 +147,7 @@ class CORE_EXPORT QgsProcessingContext
QgsProcessingContext::Flags mFlags = 0;
QPointer< QgsProject > mProject;
//! Temporary project owned by the context, used for storing temporarily loaded map layers
QgsProject tempProject;
QgsMapLayerStore tempLayerStore;
QgsExpressionContext mExpressionContext;
QgsFeatureRequest::InvalidGeometryCheck mInvalidGeometryCheck = QgsFeatureRequest::GeometryNoCheck;
std::function< void( const QgsFeature & ) > mInvalidGeometryCallback;
Expand Down

0 comments on commit 348c886

Please sign in to comment.