Skip to content

Commit e0f4d06

Browse files
committedJul 13, 2011
indentation update
1 parent 1aae72c commit e0f4d06

24 files changed

+149
-147
lines changed
 

‎src/app/composer/qgscomposeritemwidget.cpp‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ void QgsComposerItemWidget::on_mPositionButton_clicked()
189189
}
190190
}
191191

192-
void QgsComposerItemWidget::on_mItemIdLineEdit_textChanged(const QString &text)
192+
void QgsComposerItemWidget::on_mItemIdLineEdit_textChanged( const QString &text )
193193
{
194-
if ( mItem )
195-
{
196-
mItem->beginCommand( tr( "Item id changed" ), QgsComposerMergeCommand::ComposerLabelSetId );
197-
mItem->setId( text );
198-
mItem->endCommand();
199-
}
194+
if ( mItem )
195+
{
196+
mItem->beginCommand( tr( "Item id changed" ), QgsComposerMergeCommand::ComposerLabelSetId );
197+
mItem->setId( text );
198+
mItem->endCommand();
199+
}
200200
}

‎src/app/legend/qgslegend.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ QgsLegendGroup* QgsLegend::addEmbeddedGroup( const QString& groupName, const QSt
713713
removeItem( cItem );
714714
}
715715

716-
if( cItem )
716+
if ( cItem )
717717
{
718718
group->insertChild( group->childCount(), cItem );
719719
}

‎src/app/legend/qgslegendlayer.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void QgsLegendLayer::rasterLayerSymbology( QgsRasterLayer* layer )
309309
SymbologyList itemList;
310310
QList< QPair< QString, QColor > > rasterItemList = layer->legendSymbologyItems();
311311
QList< QPair< QString, QColor > >::const_iterator itemIt = rasterItemList.constBegin();
312-
for(; itemIt != rasterItemList.constEnd(); ++itemIt )
312+
for ( ; itemIt != rasterItemList.constEnd(); ++itemIt )
313313
{
314314
QPixmap itemPixmap( treeWidget()->iconSize() );
315315
itemPixmap.fill( itemIt->second );

‎src/app/qgsembedlayerdialog.cpp‎

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
QgsEmbedLayerDialog::QgsEmbedLayerDialog( QWidget * parent, Qt::WindowFlags f ): QDialog( parent, f )
1111
{
1212
setupUi( this );
13-
QObject::connect( mButtonBox, SIGNAL(rejected() ), this, SLOT(reject() ) );
13+
QObject::connect( mButtonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
1414
}
1515

1616
QgsEmbedLayerDialog::~QgsEmbedLayerDialog()
@@ -23,11 +23,11 @@ QList< QPair < QString, QString > > QgsEmbedLayerDialog::embeddedGroups() const
2323

2424
QList<QTreeWidgetItem*> items = mTreeWidget->selectedItems();
2525
QList<QTreeWidgetItem*>::iterator itemIt = items.begin();
26-
for(; itemIt != items.end(); ++itemIt )
26+
for ( ; itemIt != items.end(); ++itemIt )
2727
{
28-
if( (*itemIt)->data(0, Qt::UserRole).toString() == "group" )
28+
if (( *itemIt )->data( 0, Qt::UserRole ).toString() == "group" )
2929
{
30-
result.push_back( qMakePair( (*itemIt)->text( 0 ), mProjectPath ) );
30+
result.push_back( qMakePair(( *itemIt )->text( 0 ), mProjectPath ) );
3131
}
3232
}
3333

@@ -40,11 +40,11 @@ QList< QPair < QString, QString > > QgsEmbedLayerDialog::embeddedLayers() const
4040

4141
QList<QTreeWidgetItem*> items = mTreeWidget->selectedItems();
4242
QList<QTreeWidgetItem*>::iterator itemIt = items.begin();
43-
for(; itemIt != items.end(); ++itemIt )
43+
for ( ; itemIt != items.end(); ++itemIt )
4444
{
45-
if( (*itemIt)->data(0, Qt::UserRole).toString() == "layer" )
45+
if (( *itemIt )->data( 0, Qt::UserRole ).toString() == "layer" )
4646
{
47-
result.push_back( qMakePair( (*itemIt)->data(0, Qt::UserRole + 1).toString(), mProjectPath ) );
47+
result.push_back( qMakePair(( *itemIt )->data( 0, Qt::UserRole + 1 ).toString(), mProjectPath ) );
4848
}
4949
}
5050
return result;
@@ -56,8 +56,8 @@ void QgsEmbedLayerDialog::on_mBrowseFileToolButton_clicked()
5656
mProjectFileLineEdit->blockSignals( true );
5757

5858
QSettings s;
59-
QString projectFile = QFileDialog::getOpenFileName( 0, tr("Select project file"), s.value("/qgis/last_embedded_project_path").toString() ,tr("QGIS project files (*.qgs)") );
60-
if( !projectFile.isEmpty() )
59+
QString projectFile = QFileDialog::getOpenFileName( 0, tr( "Select project file" ), s.value( "/qgis/last_embedded_project_path" ).toString() , tr( "QGIS project files (*.qgs)" ) );
60+
if ( !projectFile.isEmpty() )
6161
{
6262
mProjectFileLineEdit->setText( projectFile );
6363
}
@@ -73,55 +73,55 @@ void QgsEmbedLayerDialog::on_mProjectFileLineEdit_editingFinished()
7373
void QgsEmbedLayerDialog::changeProjectFile()
7474
{
7575
QFile projectFile( mProjectFileLineEdit->text() );
76-
if( !projectFile.exists() )
76+
if ( !projectFile.exists() )
7777
{
7878
return;
7979
}
8080

81-
if( mProjectPath == mProjectFileLineEdit->text() )
81+
if ( mProjectPath == mProjectFileLineEdit->text() )
8282
{
8383
//already up to date
8484
return;
8585
}
8686

8787
//check we are not embedding from/to the same project
88-
if( mProjectFileLineEdit->text() == QgsProject::instance()->fileName() )
88+
if ( mProjectFileLineEdit->text() == QgsProject::instance()->fileName() )
8989
{
90-
QMessageBox::critical( 0, tr("Recursive embeding not possible"), tr("It is not possible to embed layers / groups from the current project") );
90+
QMessageBox::critical( 0, tr( "Recursive embeding not possible" ), tr( "It is not possible to embed layers / groups from the current project" ) );
9191
return;
9292
}
9393

9494
mTreeWidget->clear();
9595

9696
//parse project file and fill tree
97-
if( !projectFile.open( QIODevice::ReadOnly ) )
97+
if ( !projectFile.open( QIODevice::ReadOnly ) )
9898
{
9999
return;
100100
}
101101

102102
QDomDocument projectDom;
103-
if( !projectDom.setContent( &projectFile ) )
103+
if ( !projectDom.setContent( &projectFile ) )
104104
{
105105
return;
106106
}
107107

108-
QDomElement legendElem = projectDom.documentElement().firstChildElement("legend");
109-
if( legendElem.isNull() )
108+
QDomElement legendElem = projectDom.documentElement().firstChildElement( "legend" );
109+
if ( legendElem.isNull() )
110110
{
111111
return;
112112
}
113113

114114
QDomNodeList legendChildren = legendElem.childNodes();
115115
QDomElement currentChildElem;
116116

117-
for( int i = 0; i < legendChildren.size(); ++i )
117+
for ( int i = 0; i < legendChildren.size(); ++i )
118118
{
119119
currentChildElem = legendChildren.at( i ).toElement();
120-
if( currentChildElem.tagName() == "legendlayer" )
120+
if ( currentChildElem.tagName() == "legendlayer" )
121121
{
122122
addLegendLayerToTreeWidget( currentChildElem );
123123
}
124-
else if( currentChildElem.tagName() == "legendgroup" )
124+
else if ( currentChildElem.tagName() == "legendgroup" )
125125
{
126126
addLegendGroupToTreeWidget( currentChildElem );
127127
}
@@ -135,32 +135,32 @@ void QgsEmbedLayerDialog::addLegendGroupToTreeWidget( const QDomElement& groupEl
135135
QDomNodeList groupChildren = groupElem.childNodes();
136136
QDomElement currentChildElem;
137137

138-
if(groupElem.attribute("embedded") == "1" )
138+
if ( groupElem.attribute( "embedded" ) == "1" )
139139
{
140140
return;
141141
}
142142

143143
QTreeWidgetItem* groupItem = 0;
144-
if( !parent )
144+
if ( !parent )
145145
{
146146
groupItem = new QTreeWidgetItem( mTreeWidget );
147147
}
148148
else
149149
{
150150
groupItem = new QTreeWidgetItem( parent );
151151
}
152-
groupItem->setIcon( 0, QgisApp::getThemeIcon("mActionFolder.png") );
153-
groupItem->setText( 0, groupElem.attribute("name") );
152+
groupItem->setIcon( 0, QgisApp::getThemeIcon( "mActionFolder.png" ) );
153+
groupItem->setText( 0, groupElem.attribute( "name" ) );
154154
groupItem->setData( 0, Qt::UserRole, "group" );
155155

156-
for( int i = 0; i < groupChildren.size(); ++i )
156+
for ( int i = 0; i < groupChildren.size(); ++i )
157157
{
158158
currentChildElem = groupChildren.at( i ).toElement();
159-
if( currentChildElem.tagName() == "legendlayer" )
159+
if ( currentChildElem.tagName() == "legendlayer" )
160160
{
161161
addLegendLayerToTreeWidget( currentChildElem, groupItem );
162162
}
163-
else if( currentChildElem.tagName() == "legendgroup" )
163+
else if ( currentChildElem.tagName() == "legendgroup" )
164164
{
165165
addLegendGroupToTreeWidget( currentChildElem, groupItem );
166166
}
@@ -169,31 +169,31 @@ void QgsEmbedLayerDialog::addLegendGroupToTreeWidget( const QDomElement& groupEl
169169

170170
void QgsEmbedLayerDialog::addLegendLayerToTreeWidget( const QDomElement& layerElem, QTreeWidgetItem* parent )
171171
{
172-
if(layerElem.attribute("embedded") == "1" )
172+
if ( layerElem.attribute( "embedded" ) == "1" )
173173
{
174174
return;
175175
}
176176

177177
QTreeWidgetItem* item = 0;
178-
if( parent )
178+
if ( parent )
179179
{
180180
item = new QTreeWidgetItem( parent );
181181
}
182182
else
183183
{
184184
item = new QTreeWidgetItem( mTreeWidget );
185185
}
186-
item->setText( 0, layerElem.attribute("name") );
186+
item->setText( 0, layerElem.attribute( "name" ) );
187187
item->setData( 0, Qt::UserRole, "layer" );
188-
item->setData( 0, Qt::UserRole + 1, layerElem.firstChildElement("filegroup").firstChildElement("legendlayerfile").attribute("layerid") );
188+
item->setData( 0, Qt::UserRole + 1, layerElem.firstChildElement( "filegroup" ).firstChildElement( "legendlayerfile" ).attribute( "layerid" ) );
189189
}
190190

191191
void QgsEmbedLayerDialog::on_mTreeWidget_itemSelectionChanged()
192192
{
193193
mTreeWidget->blockSignals( true );
194194
QList<QTreeWidgetItem*> items = mTreeWidget->selectedItems();
195195
QList<QTreeWidgetItem*>::iterator itemIt = items.begin();
196-
for(; itemIt != items.end(); ++itemIt )
196+
for ( ; itemIt != items.end(); ++itemIt )
197197
{
198198
//deselect children recursively
199199
unselectChildren( *itemIt );
@@ -203,13 +203,13 @@ void QgsEmbedLayerDialog::on_mTreeWidget_itemSelectionChanged()
203203

204204
void QgsEmbedLayerDialog::unselectChildren( QTreeWidgetItem* item )
205205
{
206-
if( !item )
206+
if ( !item )
207207
{
208208
return;
209209
}
210210

211211
QTreeWidgetItem* currentChild = 0;
212-
for( int i = 0; i < item->childCount(); ++i )
212+
for ( int i = 0; i < item->childCount(); ++i )
213213
{
214214
currentChild = item->child( i );
215215
currentChild->setSelected( false );
@@ -221,9 +221,9 @@ void QgsEmbedLayerDialog::on_mButtonBox_accepted()
221221
{
222222
QSettings s;
223223
QFileInfo fi( mProjectPath );
224-
if( fi.exists() )
224+
if ( fi.exists() )
225225
{
226-
s.setValue("/qgis/last_embedded_project_path", fi.absolutePath() );
226+
s.setValue( "/qgis/last_embedded_project_path", fi.absolutePath() );
227227
}
228228
accept();
229229
}

‎src/app/qgsembedlayerdialog.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class QDomElement;
88

99
class QgsEmbedLayerDialog: public QDialog, private Ui::QgsEmbedLayerDialogBase
1010
{
11-
Q_OBJECT
11+
Q_OBJECT
1212
public:
1313
QgsEmbedLayerDialog( QWidget * parent = 0, Qt::WindowFlags f = 0 );
1414
~QgsEmbedLayerDialog();

‎src/core/composer/qgscomposeritem.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
330330
void rotationChanged( double newRotation );
331331
/**Used e.g. by the item widgets to update the gui elements*/
332332
void itemChanged();
333-
private:
333+
private:
334334
// Label id (unique within the same composition)
335335
QString mId;
336336
};

‎src/core/composer/qgscomposerlegenditem.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class CORE_EXPORT QgsComposerRasterSymbolItem: public QgsComposerLegendItem
125125
QString layerID() const { return mLayerID; }
126126
ItemType itemType() const { return RasterSymbolItem; }
127127

128-
void setColor( const QColor& c ){ mColor = c; }
128+
void setColor( const QColor& c ) { mColor = c; }
129129
QColor color() const { return mColor; }
130130

131131
private:

‎src/core/composer/qgslegendmodel.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,10 @@ int QgsLegendModel::addRasterLayerItems( QStandardItem* layerItem, QgsMapLayer*
238238

239239
QList< QPair< QString, QColor > > rasterItemList = rasterLayer->legendSymbologyItems();
240240
QList< QPair< QString, QColor > >::const_iterator itemIt = rasterItemList.constBegin();
241-
for(; itemIt != rasterItemList.constEnd(); ++itemIt )
241+
for ( ; itemIt != rasterItemList.constEnd(); ++itemIt )
242242
{
243243
QgsComposerRasterSymbolItem* currentSymbolItem = new QgsComposerRasterSymbolItem( itemIt->first );
244-
if( mHasTopLevelWindow )
244+
if ( mHasTopLevelWindow )
245245
{
246246
QPixmap itemPixmap( 20, 20 );
247247
itemPixmap.fill( itemIt->second );

‎src/core/qgsproject.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ class CORE_EXPORT QgsProject : public QObject
283283
@return the layer or 0 in case of error
284284
@note: added in version 1.8*/
285285
//static QgsMapLayer* createEmbeddedLayer( const QString& layerId, const QString& projectFilePath );
286-
bool createEmbeddedLayer( const QString& layerId, const QString& projectFilePath, QList<QDomNode>& brokenNodes,
287-
QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList, bool saveFlag = true );
286+
bool createEmbeddedLayer( const QString& layerId, const QString& projectFilePath, QList<QDomNode>& brokenNodes,
287+
QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList, bool saveFlag = true );
288288

289289
protected:
290290

‎src/core/spatialindex/include/RTree.h‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,25 +78,25 @@ namespace SpatialIndex
7878
extern ISpatialIndex* returnRTree( IStorageManager& in0, Tools::PropertySet& in1 );
7979
#endif//_MSC_VER
8080
extern ISpatialIndex* createNewRTree(
81-
IStorageManager& sm,
82-
double fillFactor,
83-
unsigned long indexCapacity,
84-
unsigned long leafCapacity,
85-
unsigned long dimension,
86-
RTreeVariant rv,
87-
long& indexIdentifier
88-
);
81+
IStorageManager& sm,
82+
double fillFactor,
83+
unsigned long indexCapacity,
84+
unsigned long leafCapacity,
85+
unsigned long dimension,
86+
RTreeVariant rv,
87+
long& indexIdentifier
88+
);
8989
extern ISpatialIndex* createAndBulkLoadNewRTree(
90-
BulkLoadMethod m,
91-
IDataStream& stream,
92-
IStorageManager& sm,
93-
double fillFactor,
94-
unsigned long indexCapacity,
95-
unsigned long leafCapacity,
96-
unsigned long dimension,
97-
RTreeVariant rv,
98-
long& indexIdentifier
99-
);
90+
BulkLoadMethod m,
91+
IDataStream& stream,
92+
IStorageManager& sm,
93+
double fillFactor,
94+
unsigned long indexCapacity,
95+
unsigned long leafCapacity,
96+
unsigned long dimension,
97+
RTreeVariant rv,
98+
long& indexIdentifier
99+
);
100100
extern ISpatialIndex* loadRTree( IStorageManager& in, long indexIdentifier );
101101
}
102102
}

‎src/core/spatialindex/include/SpatialIndex.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ namespace SpatialIndex
5757
//
5858
// Interfaces
5959
//
60-
interface IEntry : public Tools::IObject
60+
interface IEntry : public Tools::IObject
6161
{
6262
public:
6363
virtual long getIdentifier() const = 0;
6464
virtual void getShape( IShape** out ) const = 0;
6565
virtual ~IEntry() {}
6666
}; // IEntry
6767

68-
interface INode : public IEntry, public Tools::ISerializable
68+
interface INode : public IEntry, public Tools::ISerializable
6969
{
7070
public:
7171
virtual unsigned long getChildrenCount() const = 0;
@@ -77,14 +77,14 @@ interface INode : public IEntry, public Tools::ISerializable
7777
virtual ~INode() {}
7878
}; // INode
7979

80-
interface IData : public IEntry
80+
interface IData : public IEntry
8181
{
8282
public:
8383
virtual void getData( unsigned long& len, byte** data ) const = 0;
8484
virtual ~IData() {}
8585
}; // IData
8686

87-
interface IDataStream : public Tools::IObjectStream
87+
interface IDataStream : public Tools::IObjectStream
8888
{
8989
public:
9090
virtual IData* getNext() = 0;
@@ -168,7 +168,7 @@ interface IDataStream : public Tools::IObjectStream
168168
NewPage = -0x1
169169
};
170170

171-
interface IBuffer : public IStorageManager
171+
interface IBuffer : public IStorageManager
172172
{
173173
public:
174174
virtual unsigned long getHits() = 0;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ void QgsSVGFillSymbolLayer::startRender( QgsSymbolV2RenderContext& context )
207207
double outlineWidth = 1;
208208
int size = context.outputPixelSize( mPatternWidth );
209209
const QImage& patternImage = QgsSvgCache::instance()->svgAsImage( mSvgFilePath, size, fillColor, outlineColor, outlineWidth,
210-
context.renderContext().scaleFactor(), context.renderContext().rasterScaleFactor() );
210+
context.renderContext().scaleFactor(), context.renderContext().rasterScaleFactor() );
211211
QTransform brushTransform;
212212
brushTransform.scale( 1.0 / context.renderContext().rasterScaleFactor(), 1.0 / context.renderContext().rasterScaleFactor() );
213-
if( !doubleNear( context.alpha(), 1.0 ) )
213+
if ( !doubleNear( context.alpha(), 1.0 ) )
214214
{
215215
QImage transparentImage = patternImage.copy();
216216
QgsSymbolLayerV2Utils::multiplyImageOpacity( &transparentImage, context.alpha() );

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -472,21 +472,21 @@ QgsSymbolLayerV2* QgsSvgMarkerSymbolLayerV2::create( const QgsStringMap& props )
472472
QgsSvgMarkerSymbolLayerV2* m = new QgsSvgMarkerSymbolLayerV2( name, size, angle );
473473

474474
//we only check the svg default parameters if necessary, since it could be expensive
475-
if( !props.contains("fill") && !props.contains("outline") && !props.contains("outline-width") )
475+
if ( !props.contains( "fill" ) && !props.contains( "outline" ) && !props.contains( "outline-width" ) )
476476
{
477477
QColor fillColor, outlineColor;
478478
double outlineWidth;
479479
bool hasFillParam, hasOutlineParam, hasOutlineWidthParam;
480480
QgsSvgCache::instance()->containsParams( name, hasFillParam, fillColor, hasOutlineParam, outlineColor, hasOutlineWidthParam, outlineWidth );
481-
if( hasFillParam )
481+
if ( hasFillParam )
482482
{
483483
m->setFillColor( fillColor );
484484
}
485-
if( hasOutlineParam )
485+
if ( hasOutlineParam )
486486
{
487487
m->setOutlineColor( outlineColor );
488488
}
489-
if( hasOutlineWidthParam )
489+
if ( hasOutlineWidthParam )
490490
{
491491
m->setOutlineWidth( outlineWidth );
492492
}
@@ -510,15 +510,15 @@ void QgsSvgMarkerSymbolLayerV2::setPath( QString path )
510510
double outlineWidth;
511511
bool hasFillParam, hasOutlineParam, hasOutlineWidthParam;
512512
QgsSvgCache::instance()->containsParams( path, hasFillParam, fillColor, hasOutlineParam, outlineColor, hasOutlineWidthParam, outlineWidth );
513-
if( hasFillParam )
513+
if ( hasFillParam )
514514
{
515515
setFillColor( fillColor );
516516
}
517-
if( hasOutlineParam )
517+
if ( hasOutlineParam )
518518
{
519519
setOutlineColor( outlineColor );
520520
}
521-
if( hasOutlineWidthParam )
521+
if ( hasOutlineWidthParam )
522522
{
523523
setOutlineWidth( outlineWidth );
524524
}
@@ -555,7 +555,7 @@ void QgsSvgMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Re
555555
outputOffset = _rotatedOffset( outputOffset, mAngle );
556556
p->translate( point + outputOffset );
557557

558-
int size = (int)( context.outputLineWidth( mSize ) );
558+
int size = ( int )( context.outputLineWidth( mSize ) );
559559

560560
if ( mAngle != 0 )
561561
p->rotate( mAngle );
@@ -565,7 +565,7 @@ void QgsSvgMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Re
565565
const QImage& img = QgsSvgCache::instance()->svgAsImage( mPath, size, mFillColor, mOutlineColor, mOutlineWidth,
566566
context.renderContext().scaleFactor(), context.renderContext().rasterScaleFactor() );
567567
//consider transparency
568-
if( !doubleNear( context.alpha(), 1.0 ) )
568+
if ( !doubleNear( context.alpha(), 1.0 ) )
569569
{
570570
QImage transparentImage = img.copy();
571571
QgsSymbolLayerV2Utils::multiplyImageOpacity( &transparentImage, context.alpha() );
@@ -584,7 +584,7 @@ void QgsSvgMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Re
584584
p->drawPicture( 0, 0, pct );
585585
}
586586

587-
if( context.selected() )
587+
if ( context.selected() )
588588
{
589589
QPen pen( context.selectionColor() );
590590
pen.setWidth( context.outputLineWidth( 1.0 ) );

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ QgsSvgCacheEntry* QgsSvgCache::cacheEntry( const QString& file, int size, const
279279
else
280280
{
281281
takeEntryFromList( currentEntry );
282-
if( !mMostRecentEntry ) //list is empty
282+
if ( !mMostRecentEntry ) //list is empty
283283
{
284284
mMostRecentEntry = currentEntry;
285285
mLeastRecentEntry = currentEntry;
@@ -342,9 +342,9 @@ void QgsSvgCache::replaceElemParams( QDomElement& elem, const QColor& fill, cons
342342
value = QString::number( outlineWidth );
343343
}
344344

345-
if( entryIt != entryList.constBegin() )
345+
if ( entryIt != entryList.constBegin() )
346346
{
347-
newAttributeString.append(";");
347+
newAttributeString.append( ";" );
348348
}
349349
newAttributeString.append( key + ":" + value );
350350
}

‎src/gui/symbology-ng/qgssymbollayerv2widget.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ void QgsSvgMarkerSymbolLayerV2Widget::populateList()
575575

576576
void QgsSvgMarkerSymbolLayerV2Widget::setGuiForSvg( const QgsSvgMarkerSymbolLayerV2* layer )
577577
{
578-
if( !layer )
578+
if ( !layer )
579579
{
580580
return;
581581
}

‎src/mapserver/qgsconfigcache.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ QgsConfigParser* QgsConfigCache::insertConfiguration( const QString& filePath )
101101
if ( !configDoc->setContent( configFile, true, &errorMsg, &line, &column ) )
102102
{
103103
QgsDebugMsg( QString( "Parse error %1 at row %2, column %3 in %4 " )
104-
.arg( errorMsg ).arg( line ).arg( column ).arg( filePath ) );
104+
.arg( errorMsg ).arg( line ).arg( column ).arg( filePath ) );
105105
delete configFile;
106106
delete configDoc;
107107
return 0;

‎src/mapserver/qgspostrequesthandler.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ QgsPostRequestHandler::~QgsPostRequestHandler()
2828

2929
std::map<QString, QString> QgsPostRequestHandler::parseInput()
3030
{
31-
QgsDebugMsg("QgsPostRequestHandler::parseInput");
31+
QgsDebugMsg( "QgsPostRequestHandler::parseInput" );
3232
std::map<QString, QString> parameters;
3333
QString inputString = readPostBody();
34-
QgsDebugMsg(inputString);
34+
QgsDebugMsg( inputString );
3535
requestStringToParameterMap( inputString, parameters );
3636
return parameters;
3737
}

‎src/plugins/roadgraph/linevectorlayerdirector.cpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ void RgLineVectorLayerDirector::makeGraph( RgGraphBuilder *builder, const QVecto
107107
if ( feature.geometry()->wkbType() == QGis::WKBLineString )
108108
{
109109
mpl.push_back( feature.geometry()->asPolyline() );
110-
}else if ( feature.geometry()->wkbType() == QGis::WKBMultiLineString )
110+
}
111+
else if ( feature.geometry()->wkbType() == QGis::WKBMultiLineString )
111112
{
112113
mpl = feature.geometry()->asMultiPolyline();
113114
}
@@ -214,7 +215,8 @@ void RgLineVectorLayerDirector::makeGraph( RgGraphBuilder *builder, const QVecto
214215
if ( feature.geometry()->wkbType() == QGis::WKBLineString )
215216
{
216217
mpl.push_back( feature.geometry()->asPolyline() );
217-
}else if ( feature.geometry()->wkbType() == QGis::WKBMultiLineString )
218+
}
219+
else if ( feature.geometry()->wkbType() == QGis::WKBMultiLineString )
218220
{
219221
mpl = feature.geometry()->asMultiPolyline();
220222
}

‎src/plugins/zonal_statistics/qgszonalstatisticsdialog.cpp‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
#include "qgsvectordataprovider.h"
2222
#include "qgsvectorlayer.h"
2323

24-
QgsZonalStatisticsDialog::QgsZonalStatisticsDialog(QgisInterface* iface): QDialog(), mIface(iface)
24+
QgsZonalStatisticsDialog::QgsZonalStatisticsDialog( QgisInterface* iface ): QDialog(), mIface( iface )
2525
{
26-
setupUi(this);
26+
setupUi( this );
2727
insertAvailableLayers();
28-
mColumnPrefixLineEdit->setText(proposeAttributePrefix());
28+
mColumnPrefixLineEdit->setText( proposeAttributePrefix() );
2929
}
3030

31-
QgsZonalStatisticsDialog::QgsZonalStatisticsDialog(): QDialog(0), mIface(0)
31+
QgsZonalStatisticsDialog::QgsZonalStatisticsDialog(): QDialog( 0 ), mIface( 0 )
3232
{
33-
setupUi(this);
33+
setupUi( this );
3434
}
3535

3636
QgsZonalStatisticsDialog::~QgsZonalStatisticsDialog()
@@ -55,7 +55,7 @@ void QgsZonalStatisticsDialog::insertAvailableLayers()
5555
else
5656
{
5757
QgsVectorLayer* vl = dynamic_cast<QgsVectorLayer*>( layer_it.value() );
58-
if(vl && vl->geometryType() == QGis::Polygon)
58+
if ( vl && vl->geometryType() == QGis::Polygon )
5959
{
6060
mPolygonLayerComboBox->addItem( vl->name(), QVariant( vl->id() ) );
6161
}
@@ -76,11 +76,11 @@ QString QgsZonalStatisticsDialog::rasterFilePath() const
7676
QgsVectorLayer* QgsZonalStatisticsDialog::polygonLayer() const
7777
{
7878
int index = mPolygonLayerComboBox->currentIndex();
79-
if(index == -1)
79+
if ( index == -1 )
8080
{
8181
return 0;
8282
}
83-
return dynamic_cast<QgsVectorLayer*>(QgsMapLayerRegistry::instance()->mapLayer(mPolygonLayerComboBox->itemData( index ).toString()));
83+
return dynamic_cast<QgsVectorLayer*>( QgsMapLayerRegistry::instance()->mapLayer( mPolygonLayerComboBox->itemData( index ).toString() ) );
8484
}
8585

8686
QString QgsZonalStatisticsDialog::attributePrefix() const
@@ -90,28 +90,28 @@ QString QgsZonalStatisticsDialog::attributePrefix() const
9090

9191
QString QgsZonalStatisticsDialog::proposeAttributePrefix() const
9292
{
93-
if(!polygonLayer())
93+
if ( !polygonLayer() )
9494
{
9595
return "";
9696
}
9797

9898
QString proposedPrefix = "";
99-
while(!prefixIsValid(proposedPrefix))
99+
while ( !prefixIsValid( proposedPrefix ) )
100100
{
101-
proposedPrefix.prepend("_");
101+
proposedPrefix.prepend( "_" );
102102
}
103103
return proposedPrefix;
104104
}
105105

106-
bool QgsZonalStatisticsDialog::prefixIsValid(const QString& prefix) const
106+
bool QgsZonalStatisticsDialog::prefixIsValid( const QString& prefix ) const
107107
{
108108
QgsVectorLayer* vl = polygonLayer();
109-
if(!vl)
109+
if ( !vl )
110110
{
111111
return false;
112112
}
113113
QgsVectorDataProvider* dp = vl->dataProvider();
114-
if(!dp)
114+
if ( !dp )
115115
{
116116
return false;
117117
}
@@ -120,13 +120,13 @@ bool QgsZonalStatisticsDialog::prefixIsValid(const QString& prefix) const
120120
QgsFieldMap::const_iterator it = providerFieldMap.constBegin();
121121
QString currentFieldName;
122122

123-
for(; it != providerFieldMap.constEnd(); ++it)
123+
for ( ; it != providerFieldMap.constEnd(); ++it )
124+
{
125+
currentFieldName = it.value().name();
126+
if ( currentFieldName == ( prefix + "mean" ) || currentFieldName == ( prefix + "sum" ) || currentFieldName == ( prefix + "count" ) )
124127
{
125-
currentFieldName = it.value().name();
126-
if(currentFieldName == (prefix + "mean") || currentFieldName == (prefix + "sum") || currentFieldName == (prefix + "count") )
127-
{
128-
return false;
129-
}
128+
return false;
130129
}
130+
}
131131
return true;
132132
}

‎src/plugins/zonal_statistics/qgszonalstatisticsdialog.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class QgsVectorLayer;
2525

2626
class QgsZonalStatisticsDialog: public QDialog, private Ui::QgsZonalStatisticsDialogBase
2727
{
28-
Q_OBJECT
28+
Q_OBJECT
2929
public:
30-
QgsZonalStatisticsDialog(QgisInterface* iface);
30+
QgsZonalStatisticsDialog( QgisInterface* iface );
3131
~QgsZonalStatisticsDialog();
3232

3333
QString rasterFilePath() const;
@@ -42,7 +42,7 @@ class QgsZonalStatisticsDialog: public QDialog, private Ui::QgsZonalStatisticsDi
4242
/**Propose a valid prefix for the attributes*/
4343
QString proposeAttributePrefix() const;
4444
/**Check if a prefix can be used for the count, sum and mean attribute*/
45-
bool prefixIsValid(const QString& prefix) const;
45+
bool prefixIsValid( const QString& prefix ) const;
4646

4747
QgisInterface* mIface;
4848
};

‎src/plugins/zonal_statistics/qgszonalstatisticsplugin.cpp‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static const QString name_ = QObject::tr( "Zonal statistics plugin" );
2727
static const QString description_ = QObject::tr( "A plugin to calculate count, sum, mean of rasters for each polygon of a vector layer" );
2828
static const QString version_ = QObject::tr( "Version 0.1" );
2929

30-
QgsZonalStatisticsPlugin::QgsZonalStatisticsPlugin( QgisInterface* iface ): mIface(iface), mAction(0)
30+
QgsZonalStatisticsPlugin::QgsZonalStatisticsPlugin( QgisInterface* iface ): mIface( iface ), mAction( 0 )
3131
{
3232

3333
}
@@ -52,23 +52,23 @@ void QgsZonalStatisticsPlugin::unload()
5252

5353
void QgsZonalStatisticsPlugin::run()
5454
{
55-
QgsZonalStatisticsDialog d(mIface);
56-
if(d.exec() == QDialog::Rejected)
55+
QgsZonalStatisticsDialog d( mIface );
56+
if ( d.exec() == QDialog::Rejected )
5757
{
5858
return;
5959
}
6060

6161
QString rasterFile = d.rasterFilePath();
6262
QgsVectorLayer* vl = d.polygonLayer();
63-
if(!vl)
63+
if ( !vl )
6464
{
6565
return;
6666
}
6767

68-
QgsZonalStatistics zs(vl, rasterFile, d.attributePrefix(), 1); //atm hardcode first band
69-
QProgressDialog p(tr("Calculating zonal statistics..."), tr("Abort..."), 0, 0);
70-
p.setWindowModality(Qt::WindowModal);
71-
zs.calculateStatistics(&p);
68+
QgsZonalStatistics zs( vl, rasterFile, d.attributePrefix(), 1 ); //atm hardcode first band
69+
QProgressDialog p( tr( "Calculating zonal statistics..." ), tr( "Abort..." ), 0, 0 );
70+
p.setWindowModality( Qt::WindowModal );
71+
zs.calculateStatistics( &p );
7272
}
7373

7474
//global methods for the plugin manager

‎src/plugins/zonal_statistics/qgszonalstatisticsplugin.h‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ class QAction;
2626

2727
class QgsZonalStatisticsPlugin: public QObject, public QgisPlugin
2828
{
29-
Q_OBJECT
29+
Q_OBJECT
3030
public:
31-
QgsZonalStatisticsPlugin( QgisInterface* iface );
32-
~QgsZonalStatisticsPlugin();
31+
QgsZonalStatisticsPlugin( QgisInterface* iface );
32+
~QgsZonalStatisticsPlugin();
3333

34-
/**initialize connection to GUI*/
35-
void initGui();
36-
/**Unload the plugin and cleanup the GUI*/
37-
void unload();
34+
/**initialize connection to GUI*/
35+
void initGui();
36+
/**Unload the plugin and cleanup the GUI*/
37+
void unload();
3838

3939
private slots:
4040
/**Select input file, output file, format and analysis method*/

‎src/providers/spatialite/qgsspatialiteprovider.cpp‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ bool QgsSpatiaLiteProvider::nextFeature( QgsFeature & feature )
354354
}
355355

356356
bool QgsSpatiaLiteProvider::getFeature( sqlite3_stmt *stmt, bool fetchGeometry,
357-
QgsFeature &feature,
358-
const QgsAttributeList &fetchAttributes)
357+
QgsFeature &feature,
358+
const QgsAttributeList &fetchAttributes )
359359
{
360360
int ret = sqlite3_step( stmt );
361361
if ( ret == SQLITE_DONE )
@@ -3856,7 +3856,7 @@ bool QgsSpatiaLiteProvider::checkLayerType()
38563856
sqlite3_free_table( results );
38573857
}
38583858
else if ( mQuery.startsWith( "(select", Qt::CaseInsensitive ) &&
3859-
mQuery.endsWith( ")" ) )
3859+
mQuery.endsWith( ")" ) )
38603860
{
38613861
// checking if this one is a select query
38623862

@@ -3898,11 +3898,11 @@ bool QgsSpatiaLiteProvider::checkLayerType()
38983898
{
38993899
// checking if this one is a Table-based layer
39003900
sql = QString( "SELECT read_only FROM geometry_columns "
3901-
"LEFT JOIN geometry_columns_auth "
3902-
"USING (f_table_name, f_geometry_column) "
3903-
"WHERE f_table_name=%1 and f_geometry_column=%2" )
3904-
.arg( quotedValue( mTableName ) )
3905-
.arg( quotedValue( mGeometryColumn ) );
3901+
"LEFT JOIN geometry_columns_auth "
3902+
"USING (f_table_name, f_geometry_column) "
3903+
"WHERE f_table_name=%1 and f_geometry_column=%2" )
3904+
.arg( quotedValue( mTableName ) )
3905+
.arg( quotedValue( mGeometryColumn ) );
39063906

39073907
ret = sqlite3_get_table( sqliteHandle, sql.toUtf8().constData(), &results, &rows, &columns, &errMsg );
39083908
if ( ret != SQLITE_OK )

‎src/providers/spatialite/qgsspatialiteprovider.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,12 @@ class QgsSpatiaLiteProvider: public QgsVectorDataProvider
381381
bool getSridDetails();
382382
bool getTableSummary();
383383
bool prepareStatement( sqlite3_stmt *&stmt,
384-
const QgsAttributeList &fetchAttributes,
385-
bool fetchGeometry,
386-
QString whereClause );
384+
const QgsAttributeList &fetchAttributes,
385+
bool fetchGeometry,
386+
QString whereClause );
387387
bool getFeature( sqlite3_stmt *stmt, bool fetchGeometry,
388-
QgsFeature &feature,
389-
const QgsAttributeList &fetchAttributes );
388+
QgsFeature &feature,
389+
const QgsAttributeList &fetchAttributes );
390390
void convertToGeosWKB( const unsigned char *blob, size_t blob_size,
391391
unsigned char **wkb, size_t *geom_size );
392392
int computeSizeFromMultiWKB2D( const unsigned char *p_in, int nDims,

0 commit comments

Comments
 (0)
Please sign in to comment.