Skip to content

Commit

Permalink
Fix for ticket #5
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5279 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Apr 14, 2006
1 parent 8d91c39 commit 298f9ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgis.h
Expand Up @@ -63,7 +63,8 @@ class QGis
{
Point,
Line,
Polygon
Polygon,
Unknown
};
static const char *qgisVectorGeometryType[];

Expand Down
11 changes: 11 additions & 0 deletions src/gui/qgsvectorlayer.cpp
Expand Up @@ -1249,6 +1249,17 @@ QGis::VectorType QgsVectorLayer::vectorType() const
#endif

}

// We shouldn't get here, and if we have, other things are likely to
// go wrong. Code that uses the vectorType() 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.
std::cerr << "WARNING: This code (file " << __FILE__ << ", line "
<< __LINE__ << ") should never be reached. "
<< "Problems may occur...\n";

return QGis::Unknown;
}

QgsVectorLayerProperties *QgsVectorLayer::propertiesDialog()
Expand Down

0 comments on commit 298f9ab

Please sign in to comment.