Skip to content

Commit d8cc79a

Browse files
committedSep 26, 2014
indentation update
1 parent bfb7569 commit d8cc79a

38 files changed

+260
-263
lines changed
 

‎src/analysis/vector/qgsgeometryanalyzer.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,29 +1108,29 @@ bool QgsGeometryAnalyzer::createOffsetGeometry( QgsGeometry* geom, QgsGeometry*
11081108
//geos 3.3 needed for line offsets
11091109
#if defined(GEOS_VERSION_MAJOR) && defined(GEOS_VERSION_MINOR) && \
11101110
((GEOS_VERSION_MAJOR>3) || ((GEOS_VERSION_MAJOR==3) && (GEOS_VERSION_MINOR>=3)))
1111-
GEOSGeometry* offsetGeom = GEOSOffsetCurve_r(geosctxt, ( *inputGeomIt )->asGeos(), -offset, 8 /*quadSegments*/, 0 /*joinStyle*/, 5.0 /*mitreLimit*/ );
1112-
if ( !offsetGeom || !GEOSisValid_r(geosctxt, offsetGeom ) )
1111+
GEOSGeometry* offsetGeom = GEOSOffsetCurve_r( geosctxt, ( *inputGeomIt )->asGeos(), -offset, 8 /*quadSegments*/, 0 /*joinStyle*/, 5.0 /*mitreLimit*/ );
1112+
if ( !offsetGeom || !GEOSisValid_r( geosctxt, offsetGeom ) )
11131113
{
11141114
return false;
11151115
}
1116-
if ( !GEOSisValid_r(geosctxt, offsetGeom ) || GEOSGeomTypeId_r(geosctxt, offsetGeom ) != GEOS_LINESTRING || GEOSGeomGetNumPoints_r(geosctxt, offsetGeom ) < 1 )
1116+
if ( !GEOSisValid_r( geosctxt, offsetGeom ) || GEOSGeomTypeId_r( geosctxt, offsetGeom ) != GEOS_LINESTRING || GEOSGeomGetNumPoints_r( geosctxt, offsetGeom ) < 1 )
11171117
{
1118-
GEOSGeom_destroy_r(geosctxt, offsetGeom );
1118+
GEOSGeom_destroy_r( geosctxt, offsetGeom );
11191119
return false;
11201120
}
11211121
outputGeomList.push_back( offsetGeom );
11221122
#else
1123-
outputGeomList.push_back( GEOSGeom_clone_r(geosctxt, ( *inputGeomIt )->asGeos() ) );
1123+
outputGeomList.push_back( GEOSGeom_clone_r( geosctxt, ( *inputGeomIt )->asGeos() ) );
11241124
#endif
11251125
}
11261126
else if ( geom->type() == QGis::Point )
11271127
{
11281128
QgsPoint p = ( *inputGeomIt )->asPoint();
11291129
p = createPointOffset( p.x(), p.y(), offset, lineGeom );
1130-
GEOSCoordSequence* ptSeq = GEOSCoordSeq_create_r(geosctxt, 1, 2 );
1131-
GEOSCoordSeq_setX_r(geosctxt, ptSeq, 0, p.x() );
1132-
GEOSCoordSeq_setY_r(geosctxt, ptSeq, 0, p.y() );
1133-
GEOSGeometry* geosPt = GEOSGeom_createPoint_r(geosctxt, ptSeq );
1130+
GEOSCoordSequence* ptSeq = GEOSCoordSeq_create_r( geosctxt, 1, 2 );
1131+
GEOSCoordSeq_setX_r( geosctxt, ptSeq, 0, p.x() );
1132+
GEOSCoordSeq_setY_r( geosctxt, ptSeq, 0, p.y() );
1133+
GEOSGeometry* geosPt = GEOSGeom_createPoint_r( geosctxt, ptSeq );
11341134
outputGeomList.push_back( geosPt );
11351135
}
11361136
}
@@ -1153,11 +1153,11 @@ bool QgsGeometryAnalyzer::createOffsetGeometry( QgsGeometry* geom, QgsGeometry*
11531153
GEOSGeometry* collection = 0;
11541154
if ( geom->type() == QGis::Point )
11551155
{
1156-
collection = GEOSGeom_createCollection_r(geosctxt, GEOS_MULTIPOINT, geomArray, outputGeomList.size() );
1156+
collection = GEOSGeom_createCollection_r( geosctxt, GEOS_MULTIPOINT, geomArray, outputGeomList.size() );
11571157
}
11581158
else if ( geom->type() == QGis::Line )
11591159
{
1160-
collection = GEOSGeom_createCollection_r(geosctxt, GEOS_MULTILINESTRING, geomArray, outputGeomList.size() );
1160+
collection = GEOSGeom_createCollection_r( geosctxt, GEOS_MULTILINESTRING, geomArray, outputGeomList.size() );
11611161
}
11621162
geom->fromGeos( collection );
11631163
delete[] geomArray;

‎src/app/qgisapp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9762,7 +9762,7 @@ void QgisApp::writeProject( QDomDocument &doc )
97629762
delete clonedRoot;
97639763
doc.firstChildElement( "qgis" ).appendChild( oldLegendElem );
97649764

9765-
QgsProject::instance()->writeEntry( "Legend", "filterByMap", (bool) layerTreeView()->layerTreeModel()->legendFilterByMap() );
9765+
QgsProject::instance()->writeEntry( "Legend", "filterByMap", ( bool ) layerTreeView()->layerTreeModel()->legendFilterByMap() );
97669766

97679767
projectChanged( doc );
97689768
}

‎src/app/qgsattributeactiondialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ QgsAttributeActionDialog::QgsAttributeActionDialog( QgsAttributeAction* actions,
6262
connect( insertFieldButton, SIGNAL( clicked() ), this, SLOT( insertField() ) );
6363
connect( insertExpressionButton, SIGNAL( clicked() ), this, SLOT( insertExpression() ) );
6464

65-
connect( chooseIconButton, SIGNAL(clicked()), this, SLOT( chooseIcon() ) );
65+
connect( chooseIconButton, SIGNAL( clicked() ), this, SLOT( chooseIcon() ) );
6666

6767
init();
6868
// Populate the combo box with the field names. Will the field names
@@ -312,7 +312,7 @@ void QgsAttributeActionDialog::chooseIcon()
312312
{
313313
QList<QByteArray> list = QImageWriter::supportedImageFormats();
314314
QStringList formatList;
315-
Q_FOREACH( const QByteArray& format, list )
315+
Q_FOREACH ( const QByteArray& format, list )
316316
formatList << QString( "*.%1" ).arg( QString( format ) );
317317

318318
QString filter = QString( "Images( %1 ); All( *.* )" ).arg( formatList.join( " " ) );

‎src/app/qgsattributeactiondialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class APP_EXPORT QgsAttributeActionDialog: public QWidget, private Ui::QgsAttrib
6262

6363
private:
6464

65-
void insertRow(int row, QgsAction::ActionType type, const QString &name, const QString &action, const QString& iconPath, bool capture );
65+
void insertRow( int row, QgsAction::ActionType type, const QString &name, const QString &action, const QString& iconPath, bool capture );
6666
void swapRows( int row1, int row2 );
6767

6868
void insert( int pos );

‎src/app/qgsmaptoolrotatepointsymbols.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void QgsMapToolRotatePointSymbols::canvasPressEvent( QMouseEvent *e )
109109

110110
if ( mCurrentRotationAttributes.size() < 1 )
111111
{
112-
emit messageEmitted( tr( "The active point layer does not have a rotation attribute." ), QgsMessageBar::CRITICAL );
112+
emit messageEmitted( tr( "The active point layer does not have a rotation attribute." ), QgsMessageBar::CRITICAL );
113113
return;
114114
}
115115

‎src/core/composer/qgscomposermapitem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "qgscomposermap.h"
2020
#include <QUuid>
2121

22-
QgsComposerMapItem::QgsComposerMapItem(const QString &name, QgsComposerMap *map )
22+
QgsComposerMapItem::QgsComposerMapItem( const QString &name, QgsComposerMap *map )
2323
: QgsComposerObject( map->composition() )
2424
, mName( name )
2525
, mComposerMap( map )

‎src/core/layertree/qgslayertreegroup.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,17 @@ void QgsLayerTreeGroup::removeChildren( int from, int count )
120120
}
121121

122122
void QgsLayerTreeGroup::removeChildrenGroupWithoutLayers()
123-
{
123+
{
124124
// clean the layer tree by removing empty group
125125
foreach ( QgsLayerTreeNode* treeNode, children() )
126126
{
127127
if ( treeNode->nodeType() == QgsLayerTreeNode::NodeGroup )
128128
{
129-
QgsLayerTreeGroup* treeGroup = qobject_cast<QgsLayerTreeGroup*>( treeNode );
130-
if ( treeGroup->findLayerIds().count() == 0 )
131-
removeChildNode( treeNode );
132-
else
133-
treeGroup->removeChildrenGroupWithoutLayers();
129+
QgsLayerTreeGroup* treeGroup = qobject_cast<QgsLayerTreeGroup*>( treeNode );
130+
if ( treeGroup->findLayerIds().count() == 0 )
131+
removeChildNode( treeNode );
132+
else
133+
treeGroup->removeChildrenGroupWithoutLayers();
134134
}
135135
}
136136
}

‎src/core/layertree/qgslayertreemodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ int QgsLayerTreeModel::rowCount( const QModelIndex &parent ) const
9696

9797
if ( QgsLayerTree::isLayer( n ) )
9898
{
99-
if( !testFlag( ShowLegend ) )
99+
if ( !testFlag( ShowLegend ) )
100100
return 0;
101101

102102
QgsLayerTreeLayer* nL = QgsLayerTree::toLayer( n );

‎src/core/qgsattributeaction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void QgsAttributeAction::addAction( QgsAction::ActionType type, QString name, QS
4545
mActions << QgsAction( type, name, action, capture );
4646
}
4747

48-
void QgsAttributeAction::addAction(QgsAction::ActionType type, QString name, QString action, const QString& icon, bool capture)
48+
void QgsAttributeAction::addAction( QgsAction::ActionType type, QString name, QString action, const QString& icon, bool capture )
4949
{
5050
mActions << QgsAction( type, name, action, icon, capture );
5151
}

‎src/core/qgsattributeaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class CORE_EXPORT QgsAttributeAction
126126
* any stdout from the process will be captured and displayed in a
127127
* dialog box.
128128
*/
129-
void addAction(QgsAction::ActionType type, QString name, QString action, const QString& icon, bool capture = false );
129+
void addAction( QgsAction::ActionType type, QString name, QString action, const QString& icon, bool capture = false );
130130

131131
//! Remove an action at given index
132132
void removeAction( int index );

‎src/core/qgsconnectionpool.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,18 +206,14 @@ class QgsConnectionPool
206206
//! @return initialized connection or null on error
207207
T acquireConnection( const QString& connInfo )
208208
{
209-
QgsDebugMsg( QString( "Lock mutex 0x%1" ).arg( (qint64) &mMutex, 0, 16 ) );
210209
mMutex.lock();
211-
QgsDebugMsg( QString( "Unlock mutex 0x%1" ).arg( (qint64) &mMutex, 0, 16 ) );
212210
typename T_Groups::iterator it = mGroups.find( connInfo );
213211
if ( it == mGroups.end() )
214212
{
215213
it = mGroups.insert( connInfo, new T_Group( connInfo ) );
216214
}
217215
T_Group* group = *it;
218-
QgsDebugMsg( QString( "Unlock mutex 0x%1" ).arg( (qint64) &mMutex, 0, 16 ) );
219216
mMutex.unlock();
220-
QgsDebugMsg( QString( "Unlocked mutex 0x%1" ).arg( (qint64) &mMutex, 0, 16 ) );
221217

222218
return group->acquire();
223219
}

‎src/core/qgsfield.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ class CORE_EXPORT QgsFields
246246
//! @note added in 2.6
247247
bool operator==( const QgsFields& other ) const { return mFields == other.mFields; }
248248
//! @note added in 2.6
249-
bool operator!=( const QgsFields& other ) const { return ! ( *this == other ); }
249+
bool operator!=( const QgsFields& other ) const { return !( *this == other ); }
250250

251251
protected:
252252
//! internal storage of the container

‎src/core/qgsgeometry.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ class GEOSInit
129129

130130
~GEOSInit()
131131
{
132-
finishGEOS_r(ctxt);
132+
finishGEOS_r( ctxt );
133133
}
134134
};
135135

136136
static GEOSInit geosinit;
137137

138138
GEOSContextHandle_t QgsGeometry::getGEOSHandler()
139139
{
140-
return geosinit.ctxt;
140+
return geosinit.ctxt;
141141
}
142142

143143
QgsGeometry::QgsGeometry()
@@ -193,7 +193,7 @@ static GEOSGeometry *createGeosPoint( const QgsPoint &point )
193193
GEOSCoordSequence *coord = GEOSCoordSeq_create_r( geosinit.ctxt, 1, 2 );
194194
GEOSCoordSeq_setX_r( geosinit.ctxt, coord, 0, point.x() );
195195
GEOSCoordSeq_setY_r( geosinit.ctxt, coord, 0, point.y() );
196-
return GEOSGeom_createPoint_r(geosinit.ctxt, coord );
196+
return GEOSGeom_createPoint_r( geosinit.ctxt, coord );
197197
}
198198

199199
static GEOSCoordSequence *createGeosCoordSequence( const QgsPolyline& points )
@@ -305,7 +305,7 @@ static GEOSGeometry *createGeosPolygon( const QVector<GEOSGeometry*> &rings )
305305
{
306306
#if defined(GEOS_VERSION_MAJOR) && defined(GEOS_VERSION_MINOR) && \
307307
((GEOS_VERSION_MAJOR>3) || ((GEOS_VERSION_MAJOR==3) && (GEOS_VERSION_MINOR>=3)))
308-
return GEOSGeom_createEmptyPolygon_r(geosinit.ctxt);
308+
return GEOSGeom_createEmptyPolygon_r( geosinit.ctxt );
309309
#else
310310
shell = GEOSGeom_createLinearRing_r( geosinit.ctxt, GEOSCoordSeq_create_r( geosinit.ctxt, 0, 2 ) );
311311
#endif
@@ -379,7 +379,7 @@ QgsGeometry* QgsGeometry::fromWkt( QString wkt )
379379
{
380380
try
381381
{
382-
GEOSWKTReader *reader = GEOSWKTReader_create_r(geosinit.ctxt);
382+
GEOSWKTReader *reader = GEOSWKTReader_create_r( geosinit.ctxt );
383383
QgsGeometry *g = fromGeosGeom( GEOSWKTReader_read_r( geosinit.ctxt, reader, wkt.toLocal8Bit().data() ) );
384384
GEOSWKTReader_destroy_r( geosinit.ctxt, reader );
385385
return g;

‎src/core/qgsmaphittest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
QgsMapHitTest::QgsMapHitTest( const QgsMapSettings& settings )
10-
: mSettings( settings )
10+
: mSettings( settings )
1111
{
1212
}
1313

‎src/core/qgsmaphittest.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ class QgsVectorLayer;
1717
*/
1818
class CORE_EXPORT QgsMapHitTest
1919
{
20-
public:
21-
QgsMapHitTest( const QgsMapSettings& settings );
20+
public:
21+
QgsMapHitTest( const QgsMapSettings& settings );
2222

23-
void run();
23+
void run();
2424

25-
QSet<QgsSymbolV2*> symbolsForLayer( QgsVectorLayer* layer ) const { return mHitTest[layer]; }
25+
QSet<QgsSymbolV2*> symbolsForLayer( QgsVectorLayer* layer ) const { return mHitTest[layer]; }
2626

27-
protected:
27+
protected:
2828

29-
typedef QSet<QgsSymbolV2*> SymbolV2Set;
30-
typedef QMap<QgsVectorLayer*, SymbolV2Set> HitTest;
29+
typedef QSet<QgsSymbolV2*> SymbolV2Set;
30+
typedef QMap<QgsVectorLayer*, SymbolV2Set> HitTest;
3131

32-
void runHitTestLayer( QgsVectorLayer* vl, SymbolV2Set& usedSymbols, QgsRenderContext& context );
32+
void runHitTestLayer( QgsVectorLayer* vl, SymbolV2Set& usedSymbols, QgsRenderContext& context );
3333

34-
QgsMapSettings mSettings;
35-
HitTest mHitTest;
34+
QgsMapSettings mSettings;
35+
HitTest mHitTest;
3636

3737
};
3838

‎src/core/qgsrelation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ void QgsRelation::updateRelationStatus()
241241
mValid = false;
242242
}
243243

244-
Q_FOREACH( const FieldPair& fieldPair, mFieldPairs )
244+
Q_FOREACH ( const FieldPair& fieldPair, mFieldPairs )
245245
{
246246
if ( -1 == mReferencingLayer->fieldNameIndex( fieldPair.first )
247247
|| -1 == mReferencedLayer->fieldNameIndex( fieldPair.second ) )

‎src/core/qgsrelationmanager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ void QgsRelationManager::writeProject( QDomDocument & doc )
182182
void QgsRelationManager::layersRemoved( const QStringList& layers )
183183
{
184184
bool relationsChanged = false;
185-
Q_FOREACH( const QString& layer, layers )
185+
Q_FOREACH ( const QString& layer, layers )
186186
{
187187
QMapIterator<QString, QgsRelation> it( mRelations );
188188

‎src/core/qgsvectorlayer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,7 +2830,7 @@ void QgsVectorLayer::uniqueValues( int index, QList<QVariant> &uniqueValues, int
28302830
if ( mEditBuffer )
28312831
{
28322832
QSet<QString> vals;
2833-
Q_FOREACH( const QVariant& v, uniqueValues )
2833+
Q_FOREACH ( const QVariant& v, uniqueValues )
28342834
{
28352835
vals << v.toString();
28362836
}
@@ -3556,13 +3556,13 @@ void QgsVectorLayer::invalidateSymbolCountedFlag()
35563556

35573557
void QgsVectorLayer::onRelationsLoaded()
35583558
{
3559-
Q_FOREACH( QgsAttributeEditorElement* elem, mAttributeEditorElements )
3559+
Q_FOREACH ( QgsAttributeEditorElement* elem, mAttributeEditorElements )
35603560
{
35613561
if ( elem->type() == QgsAttributeEditorElement::AeTypeContainer )
35623562
{
35633563
QgsAttributeEditorContainer* cont = dynamic_cast< QgsAttributeEditorContainer* >( elem );
35643564
QList<QgsAttributeEditorElement*> relations = cont->findElements( QgsAttributeEditorElement::AeTypeRelation );
3565-
Q_FOREACH( QgsAttributeEditorElement* relElem, relations )
3565+
Q_FOREACH ( QgsAttributeEditorElement* relElem, relations )
35663566
{
35673567
QgsAttributeEditorRelation* rel = dynamic_cast< QgsAttributeEditorRelation* >( relElem );
35683568
rel->init( QgsProject::instance()->relationManager() );
@@ -3618,7 +3618,7 @@ QDomElement QgsAttributeEditorContainer::toDomElement( QDomDocument& doc ) const
36183618
QDomElement elem = doc.createElement( "attributeEditorContainer" );
36193619
elem.setAttribute( "name", mName );
36203620

3621-
Q_FOREACH( QgsAttributeEditorElement* child, mChildren )
3621+
Q_FOREACH ( QgsAttributeEditorElement* child, mChildren )
36223622
{
36233623
elem.appendChild( child->toDomElement( doc ) );
36243624
}
@@ -3634,7 +3634,7 @@ QList<QgsAttributeEditorElement*> QgsAttributeEditorContainer::findElements( Qgs
36343634
{
36353635
QList<QgsAttributeEditorElement*> results;
36363636

3637-
Q_FOREACH( QgsAttributeEditorElement* elem, mChildren )
3637+
Q_FOREACH ( QgsAttributeEditorElement* elem, mChildren )
36383638
{
36393639
if ( elem->type() == type )
36403640
{

‎src/core/qgsvectorlayerjoinbuffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <QDomElement>
2424

2525
QgsVectorLayerJoinBuffer::QgsVectorLayerJoinBuffer( QgsVectorLayer* layer )
26-
: mLayer( layer )
26+
: mLayer( layer )
2727
{
2828
}
2929

@@ -49,7 +49,7 @@ static bool _hasCycleDFS( QgsVectorLayer* n, QHash<QgsVectorLayer*, int>& mark )
4949
if ( mark.value( n ) == 0 ) // not visited
5050
{
5151
mark[n] = 1; // temporary
52-
foreach ( QgsVectorLayer* m, _outEdges(n) )
52+
foreach ( QgsVectorLayer* m, _outEdges( n ) )
5353
{
5454
if ( _hasCycleDFS( m, mark ) )
5555
return true;

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -708,15 +708,15 @@ void QgsCategorizedSymbolRendererV2::setSourceColorRamp( QgsVectorColorRampV2* r
708708

709709
void QgsCategorizedSymbolRendererV2::updateColorRamp( QgsVectorColorRampV2* ramp, bool inverted )
710710
{
711-
setSourceColorRamp(ramp);
712-
setInvertedColorRamp(inverted);
713-
double num=mCategories.count()-1;
711+
setSourceColorRamp( ramp );
712+
setInvertedColorRamp( inverted );
713+
double num = mCategories.count() - 1;
714714
double count = 0;
715715
foreach ( const QgsRendererCategoryV2 &cat, mCategories )
716716
{
717-
double value=count/num;
718-
if( mInvertedColorRamp ) value=1.0-value;
719-
cat.symbol()->setColor(mSourceColorRamp->color(value));
717+
double value = count / num;
718+
if ( mInvertedColorRamp ) value = 1.0 - value;
719+
cat.symbol()->setColor( mSourceColorRamp->color( value ) );
720720
count += 1;
721721
}
722722
}
@@ -808,11 +808,11 @@ QgsCategorizedSymbolRendererV2* QgsCategorizedSymbolRendererV2::convertFromRende
808808
// If not one of the specifically handled renderers, then just grab the symbol from the renderer
809809
// Could have applied this to specific renderer types (singleSymbol, graduatedSymbo)
810810

811-
QgsCategorizedSymbolRendererV2* r =new QgsCategorizedSymbolRendererV2( "", QgsCategoryList() );
812-
QgsSymbolV2List symbols=const_cast<QgsFeatureRendererV2 *>(renderer)->symbols();
813-
if( symbols.size() > 0 )
811+
QgsCategorizedSymbolRendererV2* r = new QgsCategorizedSymbolRendererV2( "", QgsCategoryList() );
812+
QgsSymbolV2List symbols = const_cast<QgsFeatureRendererV2 *>( renderer )->symbols();
813+
if ( symbols.size() > 0 )
814814
{
815-
r->setSourceSymbol(symbols.at(0)->clone());
815+
r->setSourceSymbol( symbols.at( 0 )->clone() );
816816
}
817817
return r;
818818

0 commit comments

Comments
 (0)
Please sign in to comment.