Skip to content
Permalink
Browse files

Cleanup QgsVectorLayer::geometryType()

The method QgsVectorLayer::wkbType() already uses a member variable which is a copy
of the one on the data provider. By using this, the code becomes simpler and more
consistent.
  • Loading branch information
m-kuhn committed Mar 1, 2019
1 parent 7d83263 commit bc6a9c5d25a47743496045c2ada0bd3129afa935
Showing with 1 addition and 10 deletions.
  1. +1 −10 src/core/qgsvectorlayer.cpp
@@ -588,16 +588,7 @@ void QgsVectorLayer::setDiagramRenderer( QgsDiagramRenderer *r )

QgsWkbTypes::GeometryType QgsVectorLayer::geometryType() const
{
if ( mValid && mDataProvider )
{
return QgsWkbTypes::geometryType( mDataProvider->wkbType() );
}
else
{
QgsDebugMsgLevel( QStringLiteral( "invalid layer or pointer to mDataProvider is null" ), 3 );
}
QgsDebugMsgLevel( QStringLiteral( "Vector layer with unknown geometry type." ), 3 );
return QgsWkbTypes::UnknownGeometry;
return QgsWkbTypes::geometryType( mWkbType );
}

QgsWkbTypes::Type QgsVectorLayer::wkbType() const

0 comments on commit bc6a9c5

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