Skip to content
Permalink
Browse files

Silence longstanding debug warning

  • Loading branch information
elpaso committed Oct 29, 2018
1 parent 497a7da commit 40771042930c6e6417990c7d6609789a145d3b73
Showing with 1 addition and 10 deletions.
  1. +1 −10 src/core/qgsvectorlayer.cpp
@@ -601,16 +601,7 @@ QgsWkbTypes::GeometryType QgsVectorLayer::geometryType() const
{
QgsDebugMsgLevel( QStringLiteral( "invalid layer or pointer to mDataProvider is null" ), 3 );
}

// We shouldn't get here, and if we have, other things are likely to
// go wrong. Code that uses the type() return value should be
// rewritten to cope with a value of Qgis::Unknown. To make this
// need known, the following message is printed every time we get
// here.
// AP: it looks like we almost always get here, since 2.x ... either we remove this
// warning of take care of the problems that may occur
QgsDebugMsg( QStringLiteral( "WARNING: This code should never be reached. Problems may occur..." ) );

QgsDebugMsgLevel( QStringLiteral( "Vector layer with unknown geometry type." ), 3 );
return QgsWkbTypes::UnknownGeometry;
}

0 comments on commit 4077104

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