mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Add a takeLayer method
This commit is contained in:
parent
1ad02adfe0
commit
941aa0a650
@ -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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user