mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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:
parent
1459808365
commit
36320b2451
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user