more bugfixing in wfs provider

git-svn-id: http://svn.osgeo.org/qgis/trunk@7117 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2007-07-30 16:54:28 +00:00
parent 2f3cee8e7e
commit 1cb8bfc2b5

View File

@ -752,14 +752,25 @@ int QgsWFSProvider::getFeaturesFromGML2(const QDomElement& wfsCollectionElement,
//the children are the attributes
currentAttributeChild = layerNameElem.firstChild();
int attr = 0;
bool numeric = false;
while(!currentAttributeChild.isNull())
{
currentAttributeElement = currentAttributeChild.toElement();
if(currentAttributeElement.localName() != "boundedBy")
{
currentAttributeElement.text().toDouble(&numeric);
if((currentAttributeElement.localName()) != geometryAttribute) //a normal attribute
{
f->addAttribute(attr++, QVariant(currentAttributeElement.text()));
if(numeric)
{
f->addAttribute(attr++, QVariant(currentAttributeElement.text().toDouble()));
}
else
{
f->addAttribute(attr++, QVariant(currentAttributeElement.text()));
}
}
else //a geometry attribute
{