Skip to content
Permalink
Browse files

Remove one more use of deprecated vector file writer constructor

  • Loading branch information
nirvn authored and nyalldawson committed Feb 13, 2020
1 parent 351639c commit cb29c2d1c22b1d29a22256c6165ee610230b21cc
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/providers/wfs/qgswfsshareddata.cpp
@@ -287,8 +287,12 @@ bool QgsWFSSharedData::createCache()
vsimemFilename.sprintf( "/vsimem/qgis_wfs_cache_template_%p/features.sqlite", this );
mCacheTablename = CPLGetBasename( vsimemFilename.toStdString().c_str() );
VSIUnlink( vsimemFilename.toStdString().c_str() );
std::unique_ptr< QgsVectorFileWriter > writer = qgis::make_unique< QgsVectorFileWriter >( vsimemFilename, QString(),
cacheFields, QgsWkbTypes::Polygon, QgsCoordinateReferenceSystem(), QStringLiteral( "SpatiaLite" ), datasourceOptions, layerOptions );
QgsVectorFileWriter::SaveVectorOptions saveOptions;
saveOptions.fileEncoding = QString();
saveOptions.driverName = QStringLiteral( "SpatiaLite" );
saveOptions.datasourceOptions = datasourceOptions;
saveOptions.layerOptions = layerOptions;
std::unique_ptr< QgsVectorFileWriter > writer( QgsVectorFileWriter::create( vsimemFilename, cacheFields, QgsWkbTypes::Polygon, QgsCoordinateReferenceSystem(), QgsCoordinateTransformContext(), saveOptions ) );
if ( writer->hasError() == QgsVectorFileWriter::NoError )
{
writer.reset();

0 comments on commit cb29c2d

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