Skip to content

Commit

Permalink
Merge pull request #2874 from MerginMaps/fix_1613_depr_create_layer
Browse files Browse the repository at this point in the history
remove deprecated QGIS API for writeAsVectorFormatV2
  • Loading branch information
PeterPetrik authored Oct 25, 2023
2 parents 79454d8 + ef311f3 commit bb00c52
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/projectwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,16 @@ QgsVectorLayer *ProjectWizard::createGpkgLayer( QString const &projectDir, QList
options.driverName = QStringLiteral( "GPKG" );
options.layerName = layerName;
options.fileEncoding = QStringLiteral( "UTF-8" );
std::unique_ptr< QgsVectorFileWriter > writer( QgsVectorFileWriter::create( projectGpkgPath, predefinedFields, Qgis::WkbType::PointZ, layerCrs, QgsCoordinateTransformContext(), options ) );


QString errorMessage;
QgsVectorFileWriter::writeAsVectorFormatV2(
QgsVectorFileWriter::writeAsVectorFormatV3(
layer,
projectGpkgPath,
layer->transformContext(),
options,
&errorMessage,
nullptr,
nullptr,
&errorMessage );
nullptr );

// Check and configure layer
QgsVectorLayer *l = new QgsVectorLayer( projectGpkgPath, layerName, "ogr" );
Expand Down

1 comment on commit bb00c52

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 23.10.474111 just submitted!

Please sign in to comment.