Skip to content
Permalink
Browse files

Add a takeLayer method

  • Loading branch information
pblottiere committed Mar 2, 2018
1 parent 1ad02ad commit 941aa0a650f9074206b8bc5ca68fbb98863eab2d
Showing with 15 additions and 0 deletions.
  1. +5 −0 python/core/qgsvirtuallayertask.sip.in
  2. +5 −0 src/core/qgsvirtuallayertask.cpp
  3. +5 −0 src/core/qgsvirtuallayertask.h
@@ -34,6 +34,11 @@ Constructor.
QgsVectorLayer *layer();
%Docstring
Returns the underlying virtual layer.
%End

QgsVectorLayer *takeLayer();
%Docstring
Returns the underlying virtual layer and ownership.
%End

QgsVirtualLayerDefinition definition() const;
@@ -52,6 +52,11 @@ QgsVectorLayer *QgsVirtualLayerTask::layer()
return mLayer.get();
}

QgsVectorLayer *QgsVirtualLayerTask::takeLayer()
{
return mLayer.release();
}

void QgsVirtualLayerTask::cancel()
{
mLayer->dataProvider()->cancel();
@@ -47,6 +47,11 @@ class CORE_EXPORT QgsVirtualLayerTask : public QgsTask
*/
QgsVectorLayer *layer();

/**
* Returns the underlying virtual layer and ownership.
*/
QgsVectorLayer *takeLayer();

/**
* Returns the virtual layer definition.
*/

0 comments on commit 941aa0a

Please sign in to comment.
You can’t perform that action at this time.