Skip to content

Commit f770aea

Browse files
committedMar 22, 2012
indentation update and a few unused parameter warnings fixes
1 parent 8968496 commit f770aea

19 files changed

+119
-105
lines changed
 

‎src/app/qgsmaptoolfeatureaction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ bool QgsMapToolFeatureAction::doAction( QgsVectorLayer *layer, int x, int y )
149149
if ( featList.size() == 0 )
150150
return false;
151151

152-
foreach ( QgsFeature feat, featList )
152+
foreach( QgsFeature feat, featList )
153153
{
154154
int actionIdx = layer->actions()->defaultAction();
155155

‎src/app/qgsvectorlayerproperties.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ void QgsVectorLayerProperties::on_pbnLoadStyle_clicked()
951951
QSettings myQSettings; // where we keep last used filter in persistent state
952952
QString myLastUsedDir = myQSettings.value( "style/lastStyleDir", "." ).toString();
953953
QString myFileName = QFileDialog::getOpenFileName( this, tr( "Load layer properties from style file" ), myLastUsedDir,
954-
tr( "QGIS Layer Style File" ) + " (*.qml);;" + tr( "SLD File" ) + " (*.sld)" );
954+
tr( "QGIS Layer Style File" ) + " (*.qml);;" + tr( "SLD File" ) + " (*.sld)" );
955955
if ( myFileName.isNull() )
956956
{
957957
return;
@@ -963,7 +963,7 @@ void QgsVectorLayerProperties::on_pbnLoadStyle_clicked()
963963
if ( myFileName.endsWith( ".sld", Qt::CaseInsensitive ) )
964964
{
965965
// load from SLD
966-
myMessage = layer->loadSldStyle( myFileName, defaultLoadedFlag );
966+
myMessage = layer->loadSldStyle( myFileName, defaultLoadedFlag );
967967
}
968968
else
969969
{
@@ -991,7 +991,7 @@ void QgsVectorLayerProperties::on_pbnSaveStyleAs_clicked()
991991
QSettings myQSettings; // where we keep last used filter in persistent state
992992
QString myLastUsedDir = myQSettings.value( "style/lastStyleDir", "." ).toString();
993993
QString myOutputFileName = QFileDialog::getSaveFileName( this, tr( "Save layer properties as style file" ), myLastUsedDir,
994-
tr( "QGIS Layer Style File" ) + " (*.qml);;" + tr( "SLD File" ) + " (*.sld)" );
994+
tr( "QGIS Layer Style File" ) + " (*.qml);;" + tr( "SLD File" ) + " (*.sld)" );
995995
if ( myOutputFileName.isNull() ) //dialog canceled
996996
{
997997
return;
@@ -1006,7 +1006,7 @@ void QgsVectorLayerProperties::on_pbnSaveStyleAs_clicked()
10061006
if ( myOutputFileName.endsWith( ".sld", Qt::CaseInsensitive ) )
10071007
{
10081008
// convert to SLD
1009-
myMessage = layer->saveSldStyle( myOutputFileName, defaultLoadedFlag );
1009+
myMessage = layer->saveSldStyle( myOutputFileName, defaultLoadedFlag );
10101010
}
10111011
else
10121012
{

‎src/core/qgscoordinatereferencesystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ bool QgsCoordinateReferenceSystem::axisInverted() const
300300
OGRAxisOrientation orientation;
301301
const char *axis0 = OSRGetAxis( mCRS, mGeoFlag ? "GEOGCS" : "PROJCS", 0, &orientation );
302302
mAxisInverted = mGeoFlag
303-
? (orientation == OAO_East || orientation == OAO_West || orientation == OAO_Other )
304-
: (orientation == OAO_North || orientation == OAO_South );
303+
? ( orientation == OAO_East || orientation == OAO_West || orientation == OAO_Other )
304+
: ( orientation == OAO_North || orientation == OAO_South );
305305
QgsDebugMsg( QString( "srid:%1 axis0:%2 orientation:%3 inverted:%4" ).arg( mSRID ).arg( axis0 ).arg( OSRAxisEnumToName( orientation ) ).arg( mAxisInverted ) );
306306
}
307307

‎src/core/qgsexpression.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -664,11 +664,11 @@ QgsExpression::Node* QgsExpression::Node::createFromOgcFilter( QDomElement &elem
664664
{
665665
return QgsExpression::NodeLiteral::createFromOgcFilter( element, errorMessage );
666666
}
667-
else if ( element.localName() == "Function")
667+
else if ( element.localName() == "Function" )
668668
{
669669
return QgsExpression::NodeFunction::createFromOgcFilter( element, errorMessage );
670670
}
671-
else if ( element.localName() == "PropertyName")
671+
else if ( element.localName() == "PropertyName" )
672672
{
673673
return QgsExpression::NodeColumnRef::createFromOgcFilter( element, errorMessage );
674674
}
@@ -826,11 +826,11 @@ QgsExpression::Node* QgsExpression::NodeUnaryOperator::createFromOgcFilter( QDom
826826
if ( !operand )
827827
{
828828
if ( errorMessage.isEmpty() )
829-
errorMessage = QString( "invalid operand for '%1' unary operator" ).arg( ogcOperatorName );
829+
errorMessage = QString( "invalid operand for '%1' unary operator" ).arg( ogcOperatorName );
830830
return NULL;
831831
}
832832

833-
return new QgsExpression::NodeUnaryOperator( ( UnaryOperator ) i, operand );
833+
return new QgsExpression::NodeUnaryOperator(( UnaryOperator ) i, operand );
834834
}
835835

836836
errorMessage = QString( "%1 unary operator not supported." ).arg( element.tagName() );
@@ -975,10 +975,10 @@ QVariant QgsExpression::NodeBinaryOperator::eval( QgsExpression* parent, QgsFeat
975975
matches = QRegExp( regexp ).indexIn( str ) != -1;
976976
}
977977

978-
if( mOp == boNotLike || mOp == boNotILike )
979-
{
980-
matches = !matches;
981-
}
978+
if ( mOp == boNotLike || mOp == boNotILike )
979+
{
980+
matches = !matches;
981+
}
982982

983983
return matches ? TVL_True : TVL_False;
984984
}
@@ -1085,8 +1085,8 @@ void QgsExpression::NodeBinaryOperator::toOgcFilter( QDomDocument &doc, QDomElem
10851085

10861086
element.appendChild( eqElem );
10871087
}
1088-
else if ( ( opLeftLiteral && opLeftLiteral->value().isNull() ) ||
1089-
( opRightLiteral && opRightLiteral->value().isNull() ) )
1088+
else if (( opLeftLiteral && opLeftLiteral->value().isNull() ) ||
1089+
( opRightLiteral && opRightLiteral->value().isNull() ) )
10901090
{
10911091
// at least one operand is NULL, use <ogc:PropertyIsNull> element
10921092
QDomElement isNullElem = doc.createElement( "ogc:PropertyIsNull" );
@@ -1186,7 +1186,7 @@ QgsExpression::Node* QgsExpression::NodeBinaryOperator::createFromOgcFilter( QDo
11861186
if ( !opLeft )
11871187
{
11881188
if ( errorMessage.isEmpty() )
1189-
errorMessage = QString( "invalid left operand for '%1' binary operator" ).arg( ogcOperatorName );
1189+
errorMessage = QString( "invalid left operand for '%1' binary operator" ).arg( ogcOperatorName );
11901190
break;
11911191
}
11921192

@@ -1195,11 +1195,11 @@ QgsExpression::Node* QgsExpression::NodeBinaryOperator::createFromOgcFilter( QDo
11951195
if ( !opRight )
11961196
{
11971197
if ( errorMessage.isEmpty() )
1198-
errorMessage = QString( "invalid right operand for '%1' binary operator" ).arg( ogcOperatorName );
1198+
errorMessage = QString( "invalid right operand for '%1' binary operator" ).arg( ogcOperatorName );
11991199
break;
12001200
}
12011201

1202-
return new QgsExpression::NodeBinaryOperator( ( BinaryOperator ) i, opLeft, opRight );
1202+
return new QgsExpression::NodeBinaryOperator(( BinaryOperator ) i, opLeft, opRight );
12031203
}
12041204

12051205
if ( !opLeft && !opRight )

‎src/core/raster/qgscolorrampshader.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ bool QgsColorRampShader::discreteColor( double theValue, int* theReturnRedValue,
6565
myColorRampItem = mColorRampItemList.value( mCurrentColorRampItemIndex );
6666
myTinyDiff = qAbs( theValue - myColorRampItem.value );
6767
//If the previous entry is less, then search closer to the top of the list (assumes mColorRampItemList is sorted)
68-
if ( mCurrentColorRampItemIndex != 0 &&
68+
if ( mCurrentColorRampItemIndex != 0 &&
6969
theValue <= mColorRampItemList.at( mCurrentColorRampItemIndex - 1 ).value )
7070
{
7171
mCurrentColorRampItemIndex--;
@@ -121,8 +121,8 @@ bool QgsColorRampShader::exactColor( double theValue, int* theReturnRedValue, in
121121
}
122122
//pixel value sits between ramp entries so bail
123123
else if ( mCurrentColorRampItemIndex != myColorRampItemCount - 1 &&
124-
theValue > myColorRampItem.value && theValue < mColorRampItemList.at(
125-
mCurrentColorRampItemIndex + 1 ).value )
124+
theValue > myColorRampItem.value && theValue < mColorRampItemList.at(
125+
mCurrentColorRampItemIndex + 1 ).value )
126126
{
127127
return false;
128128
}
@@ -280,8 +280,8 @@ bool QgsColorRampShader::shade( double theValue, int* theReturnRedValue, int* th
280280
}
281281

282282
bool QgsColorRampShader::shade( double theRedValue, double theGreenValue,
283-
double theBlueValue, int* theReturnRedValue, int* theReturnGreenValue, int*
284-
theReturnBlueValue )
283+
double theBlueValue, int* theReturnRedValue, int* theReturnGreenValue, int*
284+
theReturnBlueValue )
285285
{
286286
Q_UNUSED( theRedValue );
287287
Q_UNUSED( theGreenValue );

‎src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ void QgsRendererCategoryV2::toSld( QDomDocument &doc, QDomElement &element, QgsS
9090
// create the ogc:Filter for the range
9191
QDomElement filterElem = doc.createElement( "ogc:Filter" );
9292
QString filterFunc = QString( "%1 = '%2'" )
93-
.arg( attrName.replace( "\"", "\"\"" ) )
94-
.arg( mValue.toString().replace( "'", "''" ) );
93+
.arg( attrName.replace( "\"", "\"\"" ) )
94+
.arg( mValue.toString().replace( "'", "''" ) );
9595
QgsSymbolLayerV2Utils::createFunctionElement( doc, filterElem, filterFunc );
9696
ruleElem.appendChild( filterElem );
9797

‎src/core/symbology-ng/qgsellipsesymbollayerv2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ QgsSymbolLayerV2* QgsEllipseSymbolLayerV2::clone() const
191191
return QgsEllipseSymbolLayerV2::create( properties() );
192192
}
193193

194-
void QgsEllipseSymbolLayerV2::toSld(QDomDocument &doc, QDomElement &element, QgsStringMap props ) const
194+
void QgsEllipseSymbolLayerV2::toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const
195195
{
196196
QDomElement symbolizerElem = doc.createElement( "se:PointSymbolizer" );
197197
if ( !props.value( "uom", "" ).isEmpty() )
@@ -256,7 +256,7 @@ QgsSymbolLayerV2* QgsEllipseSymbolLayerV2::createFromSld( QDomElement &element )
256256
QgsDebugMsg( "Entered." );
257257

258258
QDomElement graphicElem = element.firstChildElement( "Graphic" );
259-
if( graphicElem.isNull() )
259+
if ( graphicElem.isNull() )
260260
return NULL;
261261

262262
QString name = "circle";

‎src/core/symbology-ng/qgsfillsymbollayerv2.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ QgsSymbolLayerV2* QgsSVGFillSymbolLayer::clone() const
440440
return clonedLayer;
441441
}
442442

443-
void QgsSVGFillSymbolLayer::toSld(QDomDocument &doc, QDomElement &element, QgsStringMap props ) const
443+
void QgsSVGFillSymbolLayer::toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const
444444
{
445445
QDomElement symbolizerElem = doc.createElement( "se:PolygonSymbolizer" );
446446
if ( !props.value( "uom", "" ).isEmpty() )
@@ -507,15 +507,15 @@ QgsSymbolLayerV2* QgsSVGFillSymbolLayer::createFromSld( QDomElement &element )
507507
double size, borderWidth;
508508

509509
QDomElement fillElem = element.firstChildElement( "Fill" );
510-
if( fillElem.isNull() )
510+
if ( fillElem.isNull() )
511511
return NULL;
512512

513513
QDomElement graphicFillElem = fillElem.firstChildElement( "GraphicFill" );
514-
if( graphicFillElem.isNull() )
514+
if ( graphicFillElem.isNull() )
515515
return NULL;
516516

517517
QDomElement graphicElem = graphicFillElem.firstChildElement( "Graphic" );
518-
if( graphicElem.isNull() )
518+
if ( graphicElem.isNull() )
519519
return NULL;
520520

521521
if ( !QgsSymbolLayerV2Utils::externalGraphicFromSld( graphicElem, path, mimeType, fillColor, size ) )
@@ -807,7 +807,7 @@ QgsSymbolLayerV2* QgsLinePatternFillSymbolLayer::clone() const
807807
return clonedLayer;
808808
}
809809

810-
void QgsLinePatternFillSymbolLayer::toSld(QDomDocument &doc, QDomElement &element, QgsStringMap props ) const
810+
void QgsLinePatternFillSymbolLayer::toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const
811811
{
812812
QDomElement symbolizerElem = doc.createElement( "se:PolygonSymbolizer" );
813813
if ( !props.value( "uom", "" ).isEmpty() )

‎src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ void QgsRendererRangeV2::toSld( QDomDocument &doc, QDomElement &element, QgsStri
120120
// create the ogc:Filter for the range
121121
QDomElement filterElem = doc.createElement( "ogc:Filter" );
122122
QString filterFunc = QString( "%1 > %2 AND %1 <= %3" )
123-
.arg( attrName.replace( "\"", "\"\"" ) )
124-
.arg( mLowerValue ).arg( mUpperValue );
123+
.arg( attrName.replace( "\"", "\"\"" ) )
124+
.arg( mLowerValue ).arg( mUpperValue );
125125
QgsSymbolLayerV2Utils::createFunctionElement( doc, filterElem, filterFunc );
126126

127127
mSymbol->toSld( doc, ruleElem, props );

‎src/core/symbology-ng/qgslinesymbollayerv2.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ QgsSymbolLayerV2* QgsSimpleLineSymbolLayerV2::createFromSld( QDomElement &elemen
197197
QVector<qreal> customDashVector;
198198

199199
if ( !QgsSymbolLayerV2Utils::lineFromSld( strokeElem, penStyle,
200-
color, width,
201-
&penJoinStyle, &penCapStyle,
202-
&customDashVector ) )
200+
color, width,
201+
&penJoinStyle, &penCapStyle,
202+
&customDashVector ) )
203203
return NULL;
204204

205205
double offset = 0.0;
@@ -661,7 +661,7 @@ void QgsMarkerLineSymbolLayerV2::toSld( QDomDocument &doc, QDomElement &element,
661661
QgsSymbolLayerV2Utils::createGeometryElement( doc, symbolizerElem, props.value( "geom", "" ) );
662662

663663
QString gap;
664-
switch( mPlacement )
664+
switch ( mPlacement )
665665
{
666666
case FirstVertex:
667667
symbolizerElem.appendChild( QgsSymbolLayerV2Utils::createVendorOptionElement( doc, "placement", "firstPoint" ) );
@@ -681,7 +681,7 @@ void QgsMarkerLineSymbolLayerV2::toSld( QDomDocument &doc, QDomElement &element,
681681
break;
682682
}
683683

684-
if( !mRotateMarker )
684+
if ( !mRotateMarker )
685685
{
686686
// markers in LineSymbolizer must be drawn following the line orientation,
687687
// use a VendorOption when no marker rotation

‎src/core/symbology-ng/qgsmarkersymbollayerv2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ QgsSymbolLayerV2* QgsSimpleMarkerSymbolLayerV2::createFromSld( QDomElement &elem
461461
QgsDebugMsg( "Entered." );
462462

463463
QDomElement graphicElem = element.firstChildElement( "Graphic" );
464-
if( graphicElem.isNull() )
464+
if ( graphicElem.isNull() )
465465
return NULL;
466466

467467
QString name = "square";
@@ -723,7 +723,7 @@ QgsSymbolLayerV2* QgsSvgMarkerSymbolLayerV2::createFromSld( QDomElement &element
723723
QgsDebugMsg( "Entered." );
724724

725725
QDomElement graphicElem = element.firstChildElement( "Graphic" );
726-
if( graphicElem.isNull() )
726+
if ( graphicElem.isNull() )
727727
return NULL;
728728

729729
QString path, mimeType;
@@ -994,7 +994,7 @@ QgsSymbolLayerV2* QgsFontMarkerSymbolLayerV2::createFromSld( QDomElement &elemen
994994
QgsDebugMsg( "Entered." );
995995

996996
QDomElement graphicElem = element.firstChildElement( "Graphic" );
997-
if( graphicElem.isNull() )
997+
if ( graphicElem.isNull() )
998998
return NULL;
999999

10001000
QString name, format;

‎src/core/symbology-ng/qgsrendererv2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ QgsFeatureRendererV2* QgsFeatureRendererV2::loadSld( const QDomNode &node, QGis:
402402
int ruleCount = 0;
403403

404404
QDomElement ruleElem = featTypeStyleElem.firstChildElement( "Rule" );
405-
while( !ruleElem.isNull() )
405+
while ( !ruleElem.isNull() )
406406
{
407407
ruleCount++;
408408

@@ -415,7 +415,7 @@ QgsFeatureRendererV2* QgsFeatureRendererV2::loadSld( const QDomNode &node, QGis:
415415
}
416416

417417
QDomElement ruleChildElem = ruleElem.firstChildElement();
418-
while( !ruleChildElem.isNull() )
418+
while ( !ruleChildElem.isNull() )
419419
{
420420
// rule has filter or min/max scale denominator, use the RuleRenderer
421421
if ( ruleChildElem.localName() == "Filter" ||

‎src/core/symbology-ng/qgsrendererv2registry.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,23 @@ class CORE_EXPORT QgsRendererV2Metadata : public QgsRendererV2AbstractMetadata
6969
QgsRendererV2CreateFunc pfCreate,
7070
QIcon icon = QIcon(),
7171
QgsRendererV2WidgetFunc pfWidget = NULL )
72-
: QgsRendererV2AbstractMetadata( name, visibleName, icon ),
73-
mCreateFunc( pfCreate ), mWidgetFunc( pfWidget ), mCreateFromSldFunc( NULL ) {}
72+
: QgsRendererV2AbstractMetadata( name, visibleName, icon )
73+
, mCreateFunc( pfCreate )
74+
, mWidgetFunc( pfWidget )
75+
, mCreateFromSldFunc( NULL )
76+
{}
7477

7578
QgsRendererV2Metadata( QString name,
7679
QString visibleName,
7780
QgsRendererV2CreateFunc pfCreate,
7881
QgsRendererV2CreateFromSldFunc pfCreateFromSld,
7982
QIcon icon = QIcon(),
8083
QgsRendererV2WidgetFunc pfWidget = NULL )
81-
: QgsRendererV2AbstractMetadata( name, visibleName, icon ),
82-
mCreateFunc( pfCreate ), mWidgetFunc( pfWidget ), mCreateFromSldFunc( pfCreateFromSld ) {}
84+
: QgsRendererV2AbstractMetadata( name, visibleName, icon )
85+
, mCreateFunc( pfCreate )
86+
, mWidgetFunc( pfWidget )
87+
, mCreateFromSldFunc( pfCreateFromSld )
88+
{}
8389

8490
virtual QgsFeatureRendererV2* createRenderer( QDomElement& elem ) { return mCreateFunc ? mCreateFunc( elem ) : NULL; }
8591
virtual QgsRendererV2Widget* createRendererWidget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer )

‎src/core/symbology-ng/qgsrulebasedrendererv2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ QgsRuleBasedRendererV2::Rule* QgsRuleBasedRendererV2::Rule::createFromSld( QDomE
473473

474474
// retrieve the Rule element child nodes
475475
QDomElement childElem = ruleElem.firstChildElement();
476-
while( !childElem.isNull() )
476+
while ( !childElem.isNull() )
477477
{
478478
if ( childElem.localName() == "Name" )
479479
{
@@ -548,7 +548,7 @@ QgsRuleBasedRendererV2::Rule* QgsRuleBasedRendererV2::Rule::createFromSld( QDomE
548548
QgsSymbolV2 *symbol = 0;
549549
if ( layers.size() > 0 )
550550
{
551-
switch( geomType )
551+
switch ( geomType )
552552
{
553553
case QGis::Line:
554554
symbol = new QgsLineSymbolV2( layers );

‎src/core/symbology-ng/qgssinglesymbolrendererv2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ QgsFeatureRendererV2* QgsSingleSymbolRendererV2::createFromSld( QDomElement& ele
242242

243243
// retrieve the Rule element child nodes
244244
QDomElement childElem = ruleElem.firstChildElement();
245-
while( !childElem.isNull() )
245+
while ( !childElem.isNull() )
246246
{
247247
if ( childElem.localName() == "Name" )
248248
{
@@ -265,7 +265,7 @@ QgsFeatureRendererV2* QgsSingleSymbolRendererV2::createFromSld( QDomElement& ele
265265
QgsSymbolV2 *symbol = 0;
266266
if ( layers.size() > 0 )
267267
{
268-
switch( geomType )
268+
switch ( geomType )
269269
{
270270
case QGis::Line:
271271
symbol = new QgsLineSymbolV2( layers );

‎src/core/symbology-ng/qgssymbollayerv2registry.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,22 @@ class CORE_EXPORT QgsSymbolLayerV2Metadata : public QgsSymbolLayerV2AbstractMeta
5151
QgsSymbolV2::SymbolType type,
5252
QgsSymbolLayerV2CreateFunc pfCreate,
5353
QgsSymbolLayerV2WidgetFunc pfWidget = NULL )
54-
: QgsSymbolLayerV2AbstractMetadata( name, visibleName, type ),
55-
mCreateFunc( pfCreate ), mWidgetFunc( pfWidget ), mCreateFromSldFunc( NULL ) {}
54+
: QgsSymbolLayerV2AbstractMetadata( name, visibleName, type )
55+
, mCreateFunc( pfCreate )
56+
, mWidgetFunc( pfWidget )
57+
, mCreateFromSldFunc( NULL )
58+
{}
5659

5760
QgsSymbolLayerV2Metadata( QString name, QString visibleName,
5861
QgsSymbolV2::SymbolType type,
5962
QgsSymbolLayerV2CreateFunc pfCreate,
6063
QgsSymbolLayerV2CreateFromSldFunc pfCreateFromSld,
6164
QgsSymbolLayerV2WidgetFunc pfWidget = NULL )
62-
: QgsSymbolLayerV2AbstractMetadata( name, visibleName, type ),
63-
mCreateFunc( pfCreate ), mWidgetFunc ( pfWidget ), mCreateFromSldFunc( pfCreateFromSld ) {}
65+
: QgsSymbolLayerV2AbstractMetadata( name, visibleName, type )
66+
, mCreateFunc( pfCreate )
67+
, mWidgetFunc( pfWidget )
68+
, mCreateFromSldFunc( pfCreateFromSld )
69+
{}
6470

6571
QgsSymbolLayerV2CreateFunc createFunction() const { return mCreateFunc; }
6672
QgsSymbolLayerV2WidgetFunc widgetFunction() const { return mWidgetFunc; }

‎src/core/symbology-ng/qgssymbollayerv2utils.cpp

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -248,21 +248,21 @@ Qt::BrushStyle QgsSymbolLayerV2Utils::decodeBrushStyle( QString str )
248248

249249
QString QgsSymbolLayerV2Utils::encodeSldBrushStyle( Qt::BrushStyle style )
250250
{
251-
switch( style )
251+
switch ( style )
252252
{
253253
case Qt::CrossPattern: return "cross";
254254
case Qt::DiagCrossPattern: return "x";
255255

256-
/* The following names are taken from the presentation "GeoServer
257-
* Cartographic Rendering" by Andrea Aime at the FOSS4G 2010.
258-
* (see http://2010.foss4g.org/presentations/3588.pdf)
259-
*/
256+
/* The following names are taken from the presentation "GeoServer
257+
* Cartographic Rendering" by Andrea Aime at the FOSS4G 2010.
258+
* (see http://2010.foss4g.org/presentations/3588.pdf)
259+
*/
260260
case Qt::HorPattern: return "horline";
261261
case Qt::VerPattern: return "line";
262262
case Qt::BDiagPattern: return "slash";
263263
case Qt::FDiagPattern: return "backslash";
264264

265-
/* define the other names following the same pattern used above */
265+
/* define the other names following the same pattern used above */
266266
case Qt::Dense1Pattern:
267267
case Qt::Dense2Pattern:
268268
case Qt::Dense3Pattern:
@@ -372,7 +372,7 @@ QgsSymbolV2::OutputUnit QgsSymbolLayerV2Utils::decodeSldUom( QString str, double
372372
// pixel is the SLD default uom. The "standardized rendering pixel
373373
// size" is defined to be 0.28mm x 0.28mm (millimeters).
374374
if ( scaleFactor )
375-
*scaleFactor = 1/0.00028; // from pixels to millimeters
375+
*scaleFactor = 1 / 0.00028; // from pixels to millimeters
376376
return QgsSymbolV2::MM;
377377
}
378378

@@ -725,8 +725,8 @@ QDomElement QgsSymbolLayerV2Utils::saveSymbol( QString name, QgsSymbolV2* symbol
725725

726726

727727
bool QgsSymbolLayerV2Utils::createSymbolLayerV2ListFromSld( QDomElement& element,
728-
QGis::GeometryType geomType,
729-
QgsSymbolLayerV2List &layers )
728+
QGis::GeometryType geomType,
729+
QgsSymbolLayerV2List &layers )
730730
{
731731
QgsDebugMsg( "Entered." );
732732

@@ -747,7 +747,7 @@ bool QgsSymbolLayerV2Utils::createSymbolLayerV2ListFromSld( QDomElement& element
747747
}
748748
else
749749
{
750-
switch( geomType )
750+
switch ( geomType )
751751
{
752752
case QGis::Polygon:
753753
// polygon layer and point symbolizer: draw poligon centroid
@@ -789,7 +789,7 @@ bool QgsSymbolLayerV2Utils::createSymbolLayerV2ListFromSld( QDomElement& element
789789
}
790790
else
791791
{
792-
switch( geomType )
792+
switch ( geomType )
793793
{
794794
case QGis::Polygon:
795795
case QGis::Line:
@@ -826,7 +826,7 @@ bool QgsSymbolLayerV2Utils::createSymbolLayerV2ListFromSld( QDomElement& element
826826
{
827827
QgsSymbolLayerV2 *l = 0;
828828

829-
switch( geomType )
829+
switch ( geomType )
830830
{
831831
case QGis::Polygon:
832832
// polygon layer and polygon symbolizer: draw fill
@@ -940,7 +940,7 @@ QgsSymbolLayerV2* QgsSymbolLayerV2Utils::createMarkerLayerFromSld( QDomElement &
940940
bool QgsSymbolLayerV2Utils::hasExternalGraphic( QDomElement &element )
941941
{
942942
QDomElement graphicElem = element.firstChildElement( "Graphic" );
943-
if( graphicElem.isNull() )
943+
if ( graphicElem.isNull() )
944944
return false;
945945

946946
QDomElement externalGraphicElem = graphicElem.firstChildElement( "ExternalGraphic" );
@@ -981,7 +981,7 @@ bool QgsSymbolLayerV2Utils::hasExternalGraphic( QDomElement &element )
981981
bool QgsSymbolLayerV2Utils::hasWellKnownMark( QDomElement &element )
982982
{
983983
QDomElement graphicElem = element.firstChildElement( "Graphic" );
984-
if( graphicElem.isNull() )
984+
if ( graphicElem.isNull() )
985985
return false;
986986

987987
QDomElement markElem = graphicElem.firstChildElement( "Mark" );
@@ -999,7 +999,7 @@ bool QgsSymbolLayerV2Utils::hasWellKnownMark( QDomElement &element )
999999
bool QgsSymbolLayerV2Utils::needFontMarker( QDomElement &element )
10001000
{
10011001
QDomElement graphicElem = element.firstChildElement( "Graphic" );
1002-
if( graphicElem.isNull() )
1002+
if ( graphicElem.isNull() )
10031003
return false;
10041004

10051005
QDomElement markElem = graphicElem.firstChildElement( "Mark" );
@@ -1044,7 +1044,7 @@ bool QgsSymbolLayerV2Utils::needSvgMarker( QDomElement &element )
10441044
bool QgsSymbolLayerV2Utils::needEllipseMarker( QDomElement &element )
10451045
{
10461046
QDomElement graphicElem = element.firstChildElement( "Graphic" );
1047-
if( graphicElem.isNull() )
1047+
if ( graphicElem.isNull() )
10481048
return false;
10491049

10501050
QgsStringMap vendorOptions = QgsSymbolLayerV2Utils::getVendorOptionList( graphicElem );
@@ -1062,7 +1062,7 @@ bool QgsSymbolLayerV2Utils::needEllipseMarker( QDomElement &element )
10621062
bool QgsSymbolLayerV2Utils::needMarkerLine( QDomElement &element )
10631063
{
10641064
QDomElement strokeElem = element.firstChildElement( "Stroke" );
1065-
if( strokeElem.isNull() )
1065+
if ( strokeElem.isNull() )
10661066
return false;
10671067

10681068
QDomElement graphicStrokeElem = strokeElem.firstChildElement( "GraphicStroke" );
@@ -1078,7 +1078,7 @@ bool QgsSymbolLayerV2Utils::needPointPatternFill( QDomElement &element ) { Q_UNU
10781078
bool QgsSymbolLayerV2Utils::needSvgFill( QDomElement &element )
10791079
{
10801080
QDomElement fillElem = element.firstChildElement( "Fill" );
1081-
if( fillElem.isNull() )
1081+
if ( fillElem.isNull() )
10821082
return false;
10831083

10841084
QDomElement graphicFillElem = fillElem.firstChildElement( "GraphicFill" );
@@ -1158,7 +1158,7 @@ bool QgsSymbolLayerV2Utils::convertPolygonSymbolizerToPointMarker( QDomElement &
11581158
{
11591159
// GraphicFill element must contain a Graphic element
11601160
QDomElement graphicElem = graphicFillElem.firstChildElement( "Graphic" );
1161-
if( !graphicElem.isNull() )
1161+
if ( !graphicElem.isNull() )
11621162
{
11631163
// Graphic element can contains some ExternalGraphic and Mark element
11641164
// search for the first supported one and use it
@@ -1210,7 +1210,7 @@ bool QgsSymbolLayerV2Utils::convertPolygonSymbolizerToPointMarker( QDomElement &
12101210
{
12111211
// mark with ttf format may have a name like ttf://fontFamily
12121212
if ( name.startsWith( "ttf://" ) )
1213-
name = name.mid( 6 );
1213+
name = name.mid( 6 );
12141214

12151215
// mark with ttf format has a markIndex element
12161216
QDomElement markIndexElem = graphicChildElem.firstChildElement( "MarkIndex" );
@@ -1491,9 +1491,9 @@ void QgsSymbolLayerV2Utils::lineToSld( QDomDocument &doc, QDomElement &element,
14911491
dashPattern.push_back( 2.0 );
14921492
break;
14931493

1494-
case Qt::CustomDashLine:
1495-
Q_ASSERT( customDashPattern );
1496-
break;
1494+
case Qt::CustomDashLine:
1495+
Q_ASSERT( customDashPattern );
1496+
break;
14971497

14981498
default:
14991499
element.appendChild( doc.createComment( QString( "Qt::BrushStyle '%1'' not supported yet" ).arg( penStyle ) ) );
@@ -1523,9 +1523,9 @@ void QgsSymbolLayerV2Utils::lineToSld( QDomDocument &doc, QDomElement &element,
15231523

15241524

15251525
bool QgsSymbolLayerV2Utils::lineFromSld( QDomElement &element,
1526-
Qt::PenStyle &penStyle, QColor &color, double &width,
1527-
Qt::PenJoinStyle *penJoinStyle, Qt::PenCapStyle *penCapStyle,
1528-
QVector<qreal> *customDashPattern, double *dashOffset )
1526+
Qt::PenStyle &penStyle, QColor &color, double &width,
1527+
Qt::PenJoinStyle *penJoinStyle, Qt::PenCapStyle *penCapStyle,
1528+
QVector<qreal> *customDashPattern, double *dashOffset )
15291529
{
15301530
QgsDebugMsg( "Entered." );
15311531

@@ -1645,8 +1645,8 @@ bool QgsSymbolLayerV2Utils::lineFromSld( QDomElement &element,
16451645
}
16461646

16471647
void QgsSymbolLayerV2Utils::externalGraphicToSld( QDomDocument &doc, QDomElement &element,
1648-
QString path, QString mime,
1649-
QColor color, double size )
1648+
QString path, QString mime,
1649+
QColor color, double size )
16501650
{
16511651
QDomElement externalGraphicElem = doc.createElement( "se:ExternalGraphic" );
16521652
element.appendChild( externalGraphicElem );
@@ -1665,8 +1665,8 @@ void QgsSymbolLayerV2Utils::externalGraphicToSld( QDomDocument &doc, QDomElement
16651665
}
16661666

16671667
bool QgsSymbolLayerV2Utils::externalGraphicFromSld( QDomElement &element,
1668-
QString &path, QString &mime,
1669-
QColor &color, double &size )
1668+
QString &path, QString &mime,
1669+
QColor &color, double &size )
16701670
{
16711671
QgsDebugMsg( "Entered." );
16721672
Q_UNUSED( color );
@@ -1690,8 +1690,8 @@ bool QgsSymbolLayerV2Utils::externalGraphicFromSld( QDomElement &element,
16901690
}
16911691

16921692
void QgsSymbolLayerV2Utils::externalMarkerToSld( QDomDocument &doc, QDomElement &element,
1693-
QString path, QString format, int *markIndex,
1694-
QColor color, double size )
1693+
QString path, QString format, int *markIndex,
1694+
QColor color, double size )
16951695
{
16961696
QDomElement markElem = doc.createElement( "se:Mark" );
16971697
element.appendChild( markElem );
@@ -1720,8 +1720,8 @@ void QgsSymbolLayerV2Utils::externalMarkerToSld( QDomDocument &doc, QDomElement
17201720
}
17211721

17221722
bool QgsSymbolLayerV2Utils::externalMarkerFromSld( QDomElement &element,
1723-
QString &path, QString &format, int &markIndex,
1724-
QColor &color, double &size )
1723+
QString &path, QString &format, int &markIndex,
1724+
QColor &color, double &size )
17251725
{
17261726
QgsDebugMsg( "Entered." );
17271727

@@ -1764,14 +1764,14 @@ bool QgsSymbolLayerV2Utils::externalMarkerFromSld( QDomElement &element,
17641764
}
17651765

17661766
void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement &element,
1767-
QString name, QColor color, QColor borderColor,
1768-
double borderWidth, double size )
1767+
QString name, QColor color, QColor borderColor,
1768+
double borderWidth, double size )
17691769
{
17701770
QDomElement markElem = doc.createElement( "se:Mark" );
17711771
element.appendChild( markElem );
17721772

17731773
QDomElement wellKnownNameElem = doc.createElement( "se:WellKnownName" );
1774-
wellKnownNameElem.appendChild( doc.createTextNode( name ) );
1774+
wellKnownNameElem.appendChild( doc.createTextNode( name ) );
17751775
markElem.appendChild( wellKnownNameElem );
17761776

17771777
// <Fill>
@@ -1800,8 +1800,8 @@ void QgsSymbolLayerV2Utils::wellKnownMarkerToSld( QDomDocument &doc, QDomElement
18001800
}
18011801

18021802
bool QgsSymbolLayerV2Utils::wellKnownMarkerFromSld( QDomElement &element,
1803-
QString &name, QColor &color, QColor &borderColor,
1804-
double &borderWidth, double &size )
1803+
QString &name, QColor &color, QColor &borderColor,
1804+
double &borderWidth, double &size )
18051805
{
18061806
QgsDebugMsg( "Entered." );
18071807

@@ -1936,8 +1936,8 @@ bool QgsSymbolLayerV2Utils::displacementFromSldElement( QDomElement &element, QP
19361936
}
19371937

19381938
void QgsSymbolLayerV2Utils::labelTextToSld( QDomDocument &doc, QDomElement &element,
1939-
QString label, QFont font,
1940-
QColor color, double size )
1939+
QString label, QFont font,
1940+
QColor color, double size )
19411941
{
19421942
QDomElement labelElem = doc.createElement( "se:Label" );
19431943
labelElem.appendChild( doc.createTextNode( label ) );
@@ -2011,7 +2011,7 @@ bool QgsSymbolLayerV2Utils::createFunctionElement( QDomDocument &doc, QDomElemen
20112011
QgsExpression expr( function );
20122012
if ( expr.hasParserError() )
20132013
{
2014-
element.appendChild( doc.createComment( "Parser Error: " + expr.parserErrorString() + " - Expression was: " + function ) );
2014+
element.appendChild( doc.createComment( "Parser Error: " + expr.parserErrorString() + " - Expression was: " + function ) );
20152015
return false;
20162016
}
20172017
expr.toOgcFilter( doc, element );
@@ -2041,7 +2041,7 @@ bool QgsSymbolLayerV2Utils::functionFromSldElement( QDomElement &element, QStrin
20412041
}
20422042

20432043
void QgsSymbolLayerV2Utils::createOnlineResourceElement( QDomDocument &doc, QDomElement &element,
2044-
QString path, QString format )
2044+
QString path, QString format )
20452045
{
20462046
QDomElement onlineResourceElem = doc.createElement( "OnlineResource" );
20472047
onlineResourceElem.setAttribute( "xlink:type", "simple" );
@@ -2085,7 +2085,7 @@ QgsStringMap QgsSymbolLayerV2Utils::getSvgParameterList( QDomElement &element )
20852085
QgsStringMap params;
20862086

20872087
QDomElement paramElem = element.firstChildElement();
2088-
while( !paramElem.isNull() )
2088+
while ( !paramElem.isNull() )
20892089
{
20902090
if ( paramElem.localName() == "SvgParameter" || paramElem.localName() == "CssParameter" )
20912091
{
@@ -2115,7 +2115,7 @@ QgsStringMap QgsSymbolLayerV2Utils::getVendorOptionList( QDomElement &element )
21152115
QgsStringMap params;
21162116

21172117
QDomElement paramElem = element.firstChildElement( "VendorOption" );
2118-
while( !paramElem.isNull() )
2118+
while ( !paramElem.isNull() )
21192119
{
21202120
QString name = paramElem.attribute( "name" );
21212121
QString value = paramElem.firstChild().nodeValue();
@@ -2267,7 +2267,9 @@ QDomElement QgsSymbolLayerV2Utils::saveSymbols( QgsSymbolV2Map& symbols, QString
22672267
void QgsSymbolLayerV2Utils::clearSymbolMap( QgsSymbolV2Map& symbols )
22682268
{
22692269
foreach( QString name, symbols.keys() )
2270+
{
22702271
delete symbols.value( name );
2272+
}
22712273
symbols.clear();
22722274
}
22732275

‎src/mapserver/qgssldparser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class QgsSLDParser: public QgsConfigParser
5656
/**Adds layer and style specific capabilities elements to the parent node. This includes the individual layers and styles, their description, native CRS, bounding boxes, etc.*/
5757
void layersAndStylesCapabilities( QDomElement& parentElement, QDomDocument& doc ) const;
5858

59-
void featureTypeList( QDomElement& parentElement, QDomDocument& doc ) const {};
59+
void featureTypeList( QDomElement &, QDomDocument & ) const {};
6060

6161
/**Returns number of layers in configuration*/
6262
int numberOfLayers() const;

‎src/mapserver/qgswfsserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ void QgsWFSServer::endGetFeature( QgsRequestHandler& request, const QString& for
629629
}
630630
}
631631

632-
QString QgsWFSServer::createFeatureGeoJSON( QgsFeature* feat, QgsCoordinateReferenceSystem& crs, QMap< int, QgsField > fields, QSet<QString> hiddenAttributes ) /*const*/
632+
QString QgsWFSServer::createFeatureGeoJSON( QgsFeature* feat, QgsCoordinateReferenceSystem &, QMap< int, QgsField > fields, QSet<QString> hiddenAttributes ) /*const*/
633633
{
634634
QString fStr = "{\"type\": \"Feature\",\n";
635635

0 commit comments

Comments
 (0)
Please sign in to comment.