Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix some warnings when compiling code for Qt
  • Loading branch information
m-kuhn committed Oct 6, 2015
1 parent 3960da1 commit dc04314
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/core/qgsattributeaction.cpp
Expand Up @@ -276,7 +276,7 @@ bool QgsAttributeAction::readXML( const QDomNode& layer_node )
if ( !aaNode.isNull() )
{
QDomNodeList actionsettings = aaNode.childNodes();
for ( unsigned int i = 0; i < actionsettings.length(); ++i )
for ( int i = 0; i < actionsettings.size(); ++i )
{
QDomElement setting = actionsettings.item( i ).toElement();
addAction(( QgsAction::ActionType ) setting.attributeNode( "type" ).value().toInt(),
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsdiagramrendererv2.cpp
Expand Up @@ -164,7 +164,7 @@ void QgsDiagramSettings::readXML( const QDomElement& elem, const QgsVectorLayer*

if ( attributes.length() > 0 )
{
for ( uint i = 0; i < attributes.length(); i++ )
for ( int i = 0; i < attributes.size(); i++ )
{
QDomElement attrElem = attributes.at( i ).toElement();
QColor newColor( attrElem.attribute( "color" ) );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsexpressionfieldbuffer.cpp
Expand Up @@ -69,7 +69,7 @@ void QgsExpressionFieldBuffer::readXml( const QDomNode& layerNode )
{
QDomNodeList fields = expressionFieldsElem.elementsByTagName( "field" );

for ( unsigned int i = 0; i < fields.length(); ++i )
for ( int i = 0; i < fields.size(); ++i )
{
QDomElement field = fields.at( i ).toElement();
QString exp = field.attribute( "expression" );
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsrulebasedlabeling.h
Expand Up @@ -2,6 +2,7 @@
#define QGSRULEBASEDLABELING_H

#include <QStringList>
#include <QMap>

#include "qgsvectorlayerlabeling.h"

Expand Down
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsvaluemapwidgetfactory.cpp
Expand Up @@ -51,7 +51,7 @@ QgsEditorWidgetConfig QgsValueMapWidgetFactory::readConfig( const QDomElement& c

QDomNodeList nodes = configElement.elementsByTagName( "value" );

for ( unsigned int i = 0; i < nodes.length(); ++i )
for ( int i = 0; i < nodes.size(); ++i )
{
QDomElement elem = nodes.at( i ).toElement();
cfg.insert( elem.attribute( "key" ), elem.attribute( "value" ) );
Expand Down
6 changes: 3 additions & 3 deletions src/providers/wfs/qgswfscapabilities.cpp
Expand Up @@ -268,7 +268,7 @@ void QgsWFSCapabilities::capabilitiesReplyFinished()

// get the <FeatureType> elements
QDomNodeList featureTypeList = capabilitiesDocument.elementsByTagNameNS( WFS_NAMESPACE, "FeatureType" );
for ( unsigned int i = 0; i < featureTypeList.length(); ++i )
for ( int i = 0; i < featureTypeList.size(); ++i )
{
FeatureType featureType;
QDomElement featureTypeElem = featureTypeList.at( i ).toElement();
Expand Down Expand Up @@ -301,14 +301,14 @@ void QgsWFSCapabilities::capabilitiesReplyFinished()

//OtherSRS
QDomNodeList otherCRSList = featureTypeElem.elementsByTagNameNS( WFS_NAMESPACE, "OtherSRS" );
for ( unsigned int i = 0; i < otherCRSList.length(); ++i )
for ( int i = 0; i < otherCRSList.size(); ++i )
{
featureType.crslist.append( otherCRSList.at( i ).toElement().text() );
}

//Support <SRS> for compatibility with older versions
QDomNodeList srsList = featureTypeElem.elementsByTagNameNS( WFS_NAMESPACE, "SRS" );
for ( unsigned int i = 0; i < srsList.length(); ++i )
for ( int i = 0; i < srsList.size(); ++i )
{
featureType.crslist.append( srsList.at( i ).toElement().text() );
}
Expand Down
4 changes: 2 additions & 2 deletions src/providers/wfs/qgswfsprovider.cpp
Expand Up @@ -913,7 +913,7 @@ int QgsWFSProvider::readAttributesFromSchema( QDomDocument& schemaDoc, QString&

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

bool foundGeometryAttribute = false;

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

0 comments on commit dc04314

Please sign in to comment.