Skip to content

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed
 

‎src/providers/gpx/gpsdata.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ typedef QSet<int> QgsFeatureIds;
4747
*/
4848
class GPSObject {
4949
public:
50+
virtual ~GPSObject() {};
5051
QString xmlify(const QString& str);
5152
virtual void writeXML(QTextStream& stream);
5253
QString name, cmt, desc, src, url, urlname;

‎src/providers/ogr/qgsogrprovider.cpp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ void QgsOgrProvider::loadFields()
213213
for(int i=0;i<fdef->GetFieldCount();++i)
214214
{
215215
OGRFieldDefn *fldDef = fdef->GetFieldDefn(i);
216-
OGRFieldType type = type = fldDef->GetType();
216+
OGRFieldType type = fldDef->GetType();
217217
bool numeric = (type == OFTInteger || type == OFTReal);
218218
mAttributeFields.insert(i, QgsField(
219219
mEncoding->toUnicode(fldDef->GetNameRef()),
@@ -495,7 +495,7 @@ void QgsOgrProvider::getFeatureGeometry(int key, QgsFeature *f)
495495

496496
if ((fet = ogrLayer->GetFeature(key)) != NULL)
497497
{
498-
if (geom = fet->GetGeometryRef())
498+
if ((geom = fet->GetGeometryRef()))
499499
{
500500
geom = fet->GetGeometryRef();
501501
// get the wkb representation
@@ -741,6 +741,13 @@ bool QgsOgrProvider::addFeature(QgsFeature& f)
741741
}
742742
break;
743743
}
744+
default:
745+
{
746+
QgsLogger::debug("Unknown feature type of: ", (int)(ftype), 1,
747+
__FILE__, __FUNCTION__, __LINE__);
748+
return false;
749+
break;
750+
}
744751
}
745752

746753
QgsAttributeMap attrs = f.attributeMap();
@@ -1411,6 +1418,13 @@ QGISEXTERN bool createEmptyDataSource(const QString& uri,
14111418
case QGis::WKBPolygon:
14121419
OGRvectortype = wkbPolygon;
14131420
break;
1421+
default:
1422+
{
1423+
QgsLogger::debug("Unknown vector type of: ", (int)(vectortype), 1,
1424+
__FILE__, __FUNCTION__, __LINE__);
1425+
return false;
1426+
break;
1427+
}
14141428
}
14151429

14161430
OGRLayer* layer;

‎src/providers/wfs/qgswfsprovider.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ int QgsWFSProvider::describeFeatureType(const QString& uri, QString& geometryAtt
301301
return describeFeatureTypePOST(uri, geometryAttribute, fields);
302302
case QgsWFSProvider::SOAP:
303303
return describeFeatureTypeSOAP(uri, geometryAttribute, fields);
304+
case QgsWFSProvider::FILE:
305+
return describeFeatureTypeFile(uri, geometryAttribute, fields);
304306
}
305307
return 1;
306308
}
@@ -534,7 +536,7 @@ int QgsWFSProvider::readAttributesFromSchema(QDomDocument& schemaDoc, QString& g
534536

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

559-
for(int i = 0; i < attributeNodeList.length(); ++i)
561+
for(uint i = 0; i < attributeNodeList.length(); ++i)
560562
{
561563
QDomElement attributeElement = attributeNodeList.at(i).toElement();
562564
//attribute name

0 commit comments

Comments
 (0)
Please sign in to comment.