File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ class QGis
63
63
{
64
64
Point ,
65
65
Line,
66
- Polygon
66
+ Polygon,
67
+ Unknown
67
68
};
68
69
static const char *qgisVectorGeometryType[];
69
70
Original file line number Diff line number Diff line change @@ -1249,6 +1249,17 @@ QGis::VectorType QgsVectorLayer::vectorType() const
1249
1249
#endif
1250
1250
1251
1251
}
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;
1252
1263
}
1253
1264
1254
1265
QgsVectorLayerProperties *QgsVectorLayer::propertiesDialog ()
You can’t perform that action at this time.
0 commit comments