mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix compiler warnings in providers
git-svn-id: http://svn.osgeo.org/qgis/trunk@6498 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
2be7dcffaa
commit
961eb1ec35
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user