mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									f304828f59
								
							
						
					
					
						commit
						1b696a7f65
					
				@ -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();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user