File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ class QGis
6363 {
6464 Point,
6565 Line,
66- Polygon
66+ Polygon,
67+ Unknown
6768 };
6869 static const char *qgisVectorGeometryType[];
6970
Original file line number Diff line number Diff line change @@ -1249,6 +1249,17 @@ QGis::VectorType QgsVectorLayer::vectorType() const
12491249#endif
12501250
12511251 }
1252+
1253+ // We shouldn't get here, and if we have, other things are likely to
1254+ // go wrong. Code that uses the vectorType() return value should be
1255+ // rewritten to cope with a value of QGis::Unknown. To make this
1256+ // need known, the following message is printed every time we get
1257+ // here.
1258+ std::cerr << " WARNING: This code (file " << __FILE__ << " , line "
1259+ << __LINE__ << " ) should never be reached. "
1260+ << " Problems may occur...\n " ;
1261+
1262+ return QGis::Unknown;
12521263}
12531264
12541265QgsVectorLayerProperties *QgsVectorLayer::propertiesDialog ()
You can’t perform that action at this time.
0 commit comments