[QGIS Commit] r13966 - in branches/threading-branch/src: core
providers/ogr
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Jul 26 09:41:19 EDT 2010
Author: wonder
Date: 2010-07-26 13:41:19 +0000 (Mon, 26 Jul 2010)
New Revision: 13966
Modified:
branches/threading-branch/src/core/qgsfeature.h
branches/threading-branch/src/providers/ogr/qgsogrfeatureiterator.cpp
branches/threading-branch/src/providers/ogr/qgsogrprovider.cpp
Log:
Set QgsFeature::typeName and setTypeName() as deprecated and modified OGR provider not to retrieve it (no other providers set it anyway)
Modified: branches/threading-branch/src/core/qgsfeature.h
===================================================================
--- branches/threading-branch/src/core/qgsfeature.h 2010-07-26 13:28:58 UTC (rev 13965)
+++ branches/threading-branch/src/core/qgsfeature.h 2010-07-26 13:41:19 UTC (rev 13966)
@@ -76,11 +76,13 @@
/** returns the feature's type name
+ * @deprecated not used anymore
*/
QString typeName() const;
/** sets the feature's type name
+ * @deprecated not used anymore
*/
void setTypeName( QString typeName );
Modified: branches/threading-branch/src/providers/ogr/qgsogrfeatureiterator.cpp
===================================================================
--- branches/threading-branch/src/providers/ogr/qgsogrfeatureiterator.cpp 2010-07-26 13:28:58 UTC (rev 13965)
+++ branches/threading-branch/src/providers/ogr/qgsogrfeatureiterator.cpp 2010-07-26 13:41:19 UTC (rev 13966)
@@ -84,11 +84,8 @@
continue;
}
- OGRFeatureDefnH featureDefinition = OGR_F_GetDefnRef( fet );
- QString featureTypeName = featureDefinition ? QString( OGR_FD_GetName( featureDefinition ) ) : QString( "" );
feature.setFeatureId( OGR_F_GetFID( fet ) );
feature.clearAttributeMap();
- feature.setTypeName( featureTypeName );
/* fetch geometry */
if ( mFetchGeometry || mUseIntersect )
Modified: branches/threading-branch/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- branches/threading-branch/src/providers/ogr/qgsogrprovider.cpp 2010-07-26 13:28:58 UTC (rev 13965)
+++ branches/threading-branch/src/providers/ogr/qgsogrprovider.cpp 2010-07-26 13:41:19 UTC (rev 13966)
@@ -586,7 +586,7 @@
if ( OGR_F_IsFieldSet( ogrFet, attindex ) )
{
- switch ( mAttributeFields[attindex].type() )
+ switch ( mAttributeFields.value(attindex).type() )
{
case QVariant::String: value = QVariant( mEncoding->toUnicode( OGR_F_GetFieldAsString( ogrFet, attindex ) ) ); break;
case QVariant::Int: value = QVariant( OGR_F_GetFieldAsInteger( ogrFet, attindex ) ); break;
More information about the QGIS-commit
mailing list