mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Use a QgsMapLayerStore instead of whole QgsProject for
temporary layer storage in QgsProcessingContext
This commit is contained in:
parent
10b1896a3c
commit
348c886602
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user