Skip to content
Permalink
Browse files

Make QgsVectorLayerExporter::flushBuffer public

Sometimes it's necessary to manually call this, instead of
deleting the exporter and letting it be called automatically
There's a chance that features in the buffer will cause errors
while being exported, and if the only way to flush the buffer
is to delete the exporter then there's no way to detect or
retrieve these errors.
  • Loading branch information
nyalldawson committed Jun 22, 2017
1 parent f304828 commit 1b696a7f6528f3df9aab8b7b041bb3d07d9bce0c
Showing with 13 additions and 2 deletions.
  1. +7 −0 python/core/qgsvectorlayerexporter.sip
  2. +6 −2 src/core/qgsvectorlayerexporter.h
@@ -124,6 +124,13 @@ class QgsVectorLayerExporter : QgsFeatureSink
Finalizes the export and closes the new created layer.
%End

bool flushBuffer();
%Docstring
Flush the buffer writing the features to the new layer.
.. versionadded:: 3.0
:rtype: bool
%End

private:
QgsVectorLayerExporter( const QgsVectorLayerExporter &rh );
};
@@ -141,10 +141,14 @@ class CORE_EXPORT QgsVectorLayerExporter : public QgsFeatureSink
*/
~QgsVectorLayerExporter();

private:
//! Flush the buffer writing the features to the new layer
/**
* Flush the buffer writing the features to the new layer.
* \since QGIS 3.0
*/
bool flushBuffer();

private:

//! Create index
bool createSpatialIndex();

0 comments on commit 1b696a7

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