Added debug statement for getFeatureAttribute().

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@2327 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mcoletti 2004-11-24 17:09:20 +00:00
parent 1459808365
commit 36320b2451

View File

@ -419,6 +419,7 @@ QgsFeature *QgsShapeFileProvider::getNextFeature(std::list<int>& attlist)
getFeatureAttribute(fet,f,*it);
}
delete fet;
//delete [] feature;
}
else
{
@ -583,6 +584,14 @@ int QgsShapeFileProvider::fieldCount(){
void QgsShapeFileProvider::getFeatureAttribute(OGRFeature * ogrFet, QgsFeature * f, int attindex)
{
OGRFieldDefn *fldDef = ogrFet->GetFieldDefnRef(attindex);
if ( ! fldDef )
{
qDebug( "%s:%d ogrFet->GetFieldDefnRef(attindex) returns NULL",
__FILE__, __LINE__ );
return;
}
QString fld = fldDef->GetNameRef();
QString val;
val = ogrFet->GetFieldAsString(attindex);