From 348c88660250caeb3c47aa1f3674ee470cdca96c Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 2 May 2017 11:07:42 +1000 Subject: [PATCH] Use a QgsMapLayerStore instead of whole QgsProject for temporary layer storage in QgsProcessingContext --- python/core/processing/qgsprocessingcontext.sip | 6 +++--- src/core/processing/qgsprocessingcontext.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/core/processing/qgsprocessingcontext.sip b/python/core/processing/qgsprocessingcontext.sip index 5d99c328b16..28951e83067 100644 --- a/python/core/processing/qgsprocessingcontext.sip +++ b/python/core/processing/qgsprocessingcontext.sip @@ -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; diff --git a/src/core/processing/qgsprocessingcontext.h b/src/core/processing/qgsprocessingcontext.h index ad58cd41c16..f1a99c56b49 100644 --- a/src/core/processing/qgsprocessingcontext.h +++ b/src/core/processing/qgsprocessingcontext.h @@ -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. @@ -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;