Skip to content
Permalink
Browse files
Fix compiler warnings in providers
git-svn-id: http://svn.osgeo.org/qgis/trunk@6498 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Feb 3, 2007
1 parent 2be7dcf commit 961eb1ec35224b9506667110eff8dbf31249523b
Showing with 21 additions and 4 deletions.
  1. +1 −0 src/providers/gpx/gpsdata.h
  2. +16 −2 src/providers/ogr/qgsogrprovider.cpp
  3. +4 −2 src/providers/wfs/qgswfsprovider.cpp
@@ -47,6 +47,7 @@ typedef QSet<int> QgsFeatureIds;
*/
class GPSObject {
public:
virtual ~GPSObject() {};
QString xmlify(const QString& str);
virtual void writeXML(QTextStream& stream);
QString name, cmt, desc, src, url, urlname;
@@ -213,7 +213,7 @@ void QgsOgrProvider::loadFields()
for(int i=0;i<fdef->GetFieldCount();++i)
{
OGRFieldDefn *fldDef = fdef->GetFieldDefn(i);
OGRFieldType type = type = fldDef->GetType();
OGRFieldType type = fldDef->GetType();
bool numeric = (type == OFTInteger || type == OFTReal);
mAttributeFields.insert(i, QgsField(
mEncoding->toUnicode(fldDef->GetNameRef()),
@@ -495,7 +495,7 @@ void QgsOgrProvider::getFeatureGeometry(int key, QgsFeature *f)

if ((fet = ogrLayer->GetFeature(key)) != NULL)
{
if (geom = fet->GetGeometryRef())
if ((geom = fet->GetGeometryRef()))
{
geom = fet->GetGeometryRef();
// get the wkb representation
@@ -741,6 +741,13 @@ bool QgsOgrProvider::addFeature(QgsFeature& f)
}
break;
}
default:
{
QgsLogger::debug("Unknown feature type of: ", (int)(ftype), 1,
__FILE__, __FUNCTION__, __LINE__);
return false;
break;
}
}

QgsAttributeMap attrs = f.attributeMap();
@@ -1411,6 +1418,13 @@ QGISEXTERN bool createEmptyDataSource(const QString& uri,
case QGis::WKBPolygon:
OGRvectortype = wkbPolygon;
break;
default:
{
QgsLogger::debug("Unknown vector type of: ", (int)(vectortype), 1,
__FILE__, __FUNCTION__, __LINE__);
return false;
break;
}
}

OGRLayer* layer;
@@ -301,6 +301,8 @@ int QgsWFSProvider::describeFeatureType(const QString& uri, QString& geometryAtt
return describeFeatureTypePOST(uri, geometryAttribute, fields);
case QgsWFSProvider::SOAP:
return describeFeatureTypeSOAP(uri, geometryAttribute, fields);
case QgsWFSProvider::FILE:
return describeFeatureTypeFile(uri, geometryAttribute, fields);
}
return 1;
}
@@ -534,7 +536,7 @@ int QgsWFSProvider::readAttributesFromSchema(QDomDocument& schemaDoc, QString& g

//find <complexType name=complexTypeType
QDomNodeList complexTypeNodeList = schemaElement.elementsByTagNameNS("http://www.w3.org/2001/XMLSchema", "complexType");
for(int i = 0; i < complexTypeNodeList.length(); ++i)
for(uint i = 0; i < complexTypeNodeList.length(); ++i)
{
if(complexTypeNodeList.at(i).toElement().attribute("name") == complexTypeType)
{
@@ -556,7 +558,7 @@ int QgsWFSProvider::readAttributesFromSchema(QDomDocument& schemaDoc, QString& g
return 5;
}

for(int i = 0; i < attributeNodeList.length(); ++i)
for(uint i = 0; i < attributeNodeList.length(); ++i)
{
QDomElement attributeElement = attributeNodeList.at(i).toElement();
//attribute name

0 comments on commit 961eb1e

Please sign in to comment.