Skip to content

Commit 1b54e1f

Browse files
committed
indentation update
1 parent 3bc9484 commit 1b54e1f

23 files changed

+138
-134
lines changed

src/app/qgsattributetabledialog.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class QgsAttributeTableDock : public QDockWidget
5858
};
5959

6060
QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWidget *parent, Qt::WindowFlags flags )
61-
: QDialog( parent, flags ),
62-
mDock( 0 ),
63-
mLayer( theLayer )
61+
: QDialog( parent, flags )
62+
, mDock( 0 )
63+
, mLayer( theLayer )
6464
{
6565
setupUi( this );
6666

@@ -167,7 +167,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
167167
mMainViewButtonGroup->setId( mAttributeViewButton, QgsDualView::AttributeEditor );
168168

169169
// Load default attribute table filter
170-
QgsAttributeTableFilterModel::FilterMode defaultFilterMode = (QgsAttributeTableFilterModel::FilterMode) settings.value( "/qgis/attributeTableBehaviour", QgsAttributeTableFilterModel::ShowAll ).toInt();
170+
QgsAttributeTableFilterModel::FilterMode defaultFilterMode = ( QgsAttributeTableFilterModel::FilterMode ) settings.value( "/qgis/attributeTableBehaviour", QgsAttributeTableFilterModel::ShowAll ).toInt();
171171

172172
switch ( defaultFilterMode )
173173
{
@@ -215,7 +215,7 @@ void QgsAttributeTableDialog::closeEvent( QCloseEvent* event )
215215

216216
void QgsAttributeTableDialog::columnBoxInit()
217217
{
218-
foreach( QAction* a, mFilterColumnsMenu->actions() )
218+
foreach ( QAction* a, mFilterColumnsMenu->actions() )
219219
{
220220
mFilterColumnsMenu->removeAction( a );
221221
mFilterActionMapper->removeMappings( a );
@@ -231,7 +231,7 @@ void QgsAttributeTableDialog::columnBoxInit()
231231

232232
QList<QgsField> fields = mLayer->pendingFields().toList();
233233

234-
foreach( const QgsField field, fields )
234+
foreach ( const QgsField field, fields )
235235
{
236236
if ( mLayer->editType( mLayer->fieldNameIndex( field.name() ) ) != QgsVectorLayer::Hidden )
237237
{

src/core/qgscachedfeatureiterator.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
#include "qgsvectordataprovider.h"
1919

2020
QgsCachedFeatureIterator::QgsCachedFeatureIterator( QgsVectorLayerCache *vlCache, QgsFeatureRequest featureRequest, QgsFeatureIds featureIds )
21-
: QgsAbstractFeatureIterator( featureRequest ),
22-
mFeatureIds( featureIds ),
23-
mVectorLayerCache( vlCache )
21+
: QgsAbstractFeatureIterator( featureRequest )
22+
, mFeatureIds( featureIds )
23+
, mVectorLayerCache( vlCache )
2424
{
2525
mFeatureIdIterator = featureIds.begin();
2626
}
@@ -53,8 +53,8 @@ bool QgsCachedFeatureIterator::close()
5353
}
5454

5555
QgsCachedFeatureWriterIterator::QgsCachedFeatureWriterIterator( QgsVectorLayerCache *vlCache, QgsFeatureRequest featureRequest )
56-
: QgsAbstractFeatureIterator( featureRequest ),
57-
mVectorLayerCache( vlCache )
56+
: QgsAbstractFeatureIterator( featureRequest )
57+
, mVectorLayerCache( vlCache )
5858
{
5959
mFeatIt = vlCache->layer()->dataProvider()->getFeatures( featureRequest );
6060
}

src/core/qgscacheindexfeatureid.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
#include "qgscacheindexfeatureid.h"
1717

18-
QgsCacheIndexFeatureId::QgsCacheIndexFeatureId( QgsCachedVectorLayer* cachedVectorLayer ) :
19-
QgsAbstractCacheIndex(),
20-
C( cachedVectorLayer )
18+
QgsCacheIndexFeatureId::QgsCacheIndexFeatureId( QgsCachedVectorLayer* cachedVectorLayer )
19+
: QgsAbstractCacheIndex()
20+
, C( cachedVectorLayer )
2121
{
2222

2323
}

src/core/qgscacheindexfeatureid.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class QgsCacheIndexFeatureId : public QgsAbstractCacheIndex
2424
{
2525
public:
2626
QgsCacheIndexFeatureId( QgsCachedVectorLayer* cachedVectorLayer );
27-
27+
2828
signals:
29-
29+
3030
public slots:
3131

3232
private:

src/core/qgsgeometrycache.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#include "qgsvectorlayereditbuffer.h"
44

5-
QgsGeometryCache::QgsGeometryCache(QgsVectorLayer* layer)
6-
: L(layer)
5+
QgsGeometryCache::QgsGeometryCache( QgsVectorLayer* layer )
6+
: L( layer )
77
{
88
}
99

@@ -13,7 +13,7 @@ QgsGeometryCache::~QgsGeometryCache()
1313
deleteCachedGeometries();
1414
}
1515

16-
bool QgsGeometryCache::geometry(QgsFeatureId fid, QgsGeometry& geometry)
16+
bool QgsGeometryCache::geometry( QgsFeatureId fid, QgsGeometry& geometry )
1717
{
1818
// no need to check changed geometries because all changed geometries are also cached
1919

src/core/qgsgeometrycache.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,39 @@
77

88
class QgsGeometryCache
99
{
10-
public:
11-
QgsGeometryCache(QgsVectorLayer* layer);
12-
~QgsGeometryCache();
10+
public:
11+
QgsGeometryCache( QgsVectorLayer* layer );
12+
~QgsGeometryCache();
1313

14-
inline QgsGeometryMap& cachedGeometries() { return mCachedGeometries; }
14+
inline QgsGeometryMap& cachedGeometries() { return mCachedGeometries; }
1515

16-
//! fetch geometry from cache, return true if successful
17-
bool geometry(QgsFeatureId fid, QgsGeometry& geometry);
16+
//! fetch geometry from cache, return true if successful
17+
bool geometry( QgsFeatureId fid, QgsGeometry& geometry );
1818

19-
//! store a geometry in the cache
20-
void cacheGeometry( QgsFeatureId fid, const QgsGeometry& geom );
19+
//! store a geometry in the cache
20+
void cacheGeometry( QgsFeatureId fid, const QgsGeometry& geom );
2121

22-
//! get rid of the cached geometry
23-
void removeGeometry( QgsFeatureId fid ) { mCachedGeometries.remove(fid); }
22+
//! get rid of the cached geometry
23+
void removeGeometry( QgsFeatureId fid ) { mCachedGeometries.remove( fid ); }
2424

2525

26-
/** Deletes the geometries in mCachedGeometries */
27-
void deleteCachedGeometries();
26+
/** Deletes the geometries in mCachedGeometries */
27+
void deleteCachedGeometries();
2828

29-
void setCachedGeometriesRect( const QgsRectangle& extent ) { mCachedGeometriesRect = extent; }
30-
const QgsRectangle& cachedGeometriesRect() { return mCachedGeometriesRect; }
29+
void setCachedGeometriesRect( const QgsRectangle& extent ) { mCachedGeometriesRect = extent; }
30+
const QgsRectangle& cachedGeometriesRect() { return mCachedGeometriesRect; }
3131

32-
protected:
32+
protected:
3333

34-
inline QgsVectorLayerEditBuffer* editBuffer() { return L->editBuffer(); }
34+
inline QgsVectorLayerEditBuffer* editBuffer() { return L->editBuffer(); }
3535

36-
QgsVectorLayer* L;
36+
QgsVectorLayer* L;
3737

38-
/** cache of the committed geometries retrieved *for the current display* */
39-
QgsGeometryMap mCachedGeometries;
38+
/** cache of the committed geometries retrieved *for the current display* */
39+
QgsGeometryMap mCachedGeometries;
4040

41-
/** extent for which there are cached geometries */
42-
QgsRectangle mCachedGeometriesRect;
41+
/** extent for which there are cached geometries */
42+
QgsRectangle mCachedGeometriesRect;
4343

4444
};
4545

src/core/qgsvectorlayer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,7 +2986,7 @@ bool QgsVectorLayer::deleteAttributes( QList<int> attrs )
29862986

29872987
qSort( attrs.begin(), attrs.end(), qGreater<int>() );
29882988

2989-
foreach( int attr, attrs )
2989+
foreach ( int attr, attrs )
29902990
{
29912991
if ( deleteAttribute( attr ) )
29922992
{
@@ -3107,8 +3107,8 @@ bool QgsVectorLayer::rollBack( bool deleteBuffer )
31073107

31083108
if ( deleteBuffer )
31093109
{
3110-
delete mEditBuffer;
3111-
mEditBuffer = 0;
3110+
delete mEditBuffer;
3111+
mEditBuffer = 0;
31123112
undoStack()->clear();
31133113
}
31143114
emit editingStopped();
@@ -4160,7 +4160,7 @@ QString QgsVectorLayer::metadata()
41604160
{
41614161
myMetadata += "<tr><td>";
41624162
myMetadata += tr( "Primary key attributes: " );
4163-
foreach( int idx, pkAttrList )
4163+
foreach ( int idx, pkAttrList )
41644164
{
41654165
myMetadata += pendingFields()[ idx ].name() + " ";
41664166
}

src/core/qgsvectorlayercache.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include "qgscacheindex.h"
2020
#include "qgscachedfeatureiterator.h"
2121

22-
QgsVectorLayerCache::QgsVectorLayerCache( QgsVectorLayer* layer, int cacheSize, QObject* parent ) :
23-
QObject( parent ),
24-
mLayer( layer )
22+
QgsVectorLayerCache::QgsVectorLayerCache( QgsVectorLayer* layer, int cacheSize, QObject* parent )
23+
: QObject( parent )
24+
, mLayer( layer )
2525
{
2626
mCache.setMaxCost( cacheSize );
2727

@@ -132,10 +132,10 @@ bool QgsVectorLayerCache::featureAtId( QgsFeatureId featureId, QgsFeature& featu
132132
featureFound = true;
133133
}
134134
else if ( mLayer->getFeatures( QgsFeatureRequest()
135-
.setFilterFid( featureId )
136-
.setSubsetOfAttributes( mCachedAttributes )
135+
.setFilterFid( featureId )
136+
.setSubsetOfAttributes( mCachedAttributes )
137137
.setFlags( !mCacheGeometry ? QgsFeatureRequest::NoGeometry : QgsFeatureRequest::Flags( 0 ) ) )
138-
.nextFeature( feature ) )
138+
.nextFeature( feature ) )
139139
{
140140
cacheFeature( feature );
141141
featureFound = true;
@@ -159,7 +159,7 @@ void QgsVectorLayerCache::requestCompleted( QgsFeatureRequest featureRequest, Qg
159159
// If a request is too large for the cache don't notify to prevent from indexing incomplete requests
160160
if ( fids.count() < mCache.size() )
161161
{
162-
foreach( QgsAbstractCacheIndex* idx, mCacheIndices )
162+
foreach ( QgsAbstractCacheIndex* idx, mCacheIndices )
163163
{
164164
idx->requestCompleted( featureRequest, fids );
165165
}
@@ -168,7 +168,7 @@ void QgsVectorLayerCache::requestCompleted( QgsFeatureRequest featureRequest, Qg
168168

169169
void QgsVectorLayerCache::featureRemoved( QgsFeatureId fid )
170170
{
171-
foreach( QgsAbstractCacheIndex* idx, mCacheIndices )
171+
foreach ( QgsAbstractCacheIndex* idx, mCacheIndices )
172172
{
173173
idx->flushFeature( fid );
174174
}
@@ -236,7 +236,7 @@ QgsFeatureIterator QgsVectorLayerCache::getFeatures( const QgsFeatureRequest &fe
236236
if ( checkInformationCovered( featureRequest ) )
237237
{
238238
// Check if an index is able to deliver the requested features
239-
foreach( QgsAbstractCacheIndex *idx, mCacheIndices )
239+
foreach ( QgsAbstractCacheIndex *idx, mCacheIndices )
240240
{
241241
QgsFeatureIds featureIds;
242242

src/core/qgsvectorlayercache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ class CORE_EXPORT QgsVectorLayerCache : public QObject
5454
* @param feat The feature to cache. A copy will be made.
5555
* @param vlCache The cache to inform when the feature has been removed from the cache.
5656
*/
57-
QgsCachedFeature( const QgsFeature& feat, QgsVectorLayerCache* vlCache ) :
58-
mCache( vlCache )
57+
QgsCachedFeature( const QgsFeature& feat, QgsVectorLayerCache* vlCache )
58+
: mCache( vlCache )
5959
{
6060
mFeature = new QgsFeature( feat );
6161
}

src/gui/attributetable/qgsattributetabledelegate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class QgsAttributeTableDelegate : public QItemDelegate
4141
* @param parent parent object
4242
*/
4343
QgsAttributeTableDelegate( QObject* parent = NULL ) :
44-
QItemDelegate( parent ) {};
44+
QItemDelegate( parent ) {};
4545
/** Used to create an editor for when the user tries to
4646
* change the contents of a cell */
4747
QWidget * createEditor(

src/gui/attributetable/qgsattributetablefiltermodel.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
// Filter Model //
2828
//////////////////
2929

30-
QgsAttributeTableFilterModel::QgsAttributeTableFilterModel( QgsMapCanvas* canvas, QgsAttributeTableModel* sourceModel, QObject* parent ) :
31-
QSortFilterProxyModel( parent ),
32-
mCanvas( canvas ),
33-
mFilterMode( ShowAll ),
34-
mSelectedOnTop( false )
30+
QgsAttributeTableFilterModel::QgsAttributeTableFilterModel( QgsMapCanvas* canvas, QgsAttributeTableModel* sourceModel, QObject* parent )
31+
: QSortFilterProxyModel( parent )
32+
, mCanvas( canvas )
33+
, mFilterMode( ShowAll )
34+
, mSelectedOnTop( false )
3535
{
3636
mMasterSelection = new QItemSelectionModel( this, this );
3737
setSourceModel( sourceModel );
@@ -122,7 +122,7 @@ void QgsAttributeTableFilterModel::selectionChanged()
122122

123123
QItemSelection selection;
124124

125-
foreach( QgsFeatureId fid, layer()->selectedFeaturesIds() )
125+
foreach ( QgsFeatureId fid, layer()->selectedFeaturesIds() )
126126
{
127127
selection.append( QItemSelectionRange( mTableModel->idToIndex( fid ) ) );
128128
}
@@ -151,28 +151,28 @@ void QgsAttributeTableFilterModel::masterSelectionChanged( const QItemSelection
151151
QgsFeatureIds selectedFeatureIds;
152152
QgsFeatureIds deselectedFeatureIds;
153153

154-
foreach( QItemSelectionRange selectedRange, selected )
154+
foreach ( QItemSelectionRange selectedRange, selected )
155155
{
156-
foreach( QModelIndex selectedModelIdx, selectedRange.indexes() )
156+
foreach ( QModelIndex selectedModelIdx, selectedRange.indexes() )
157157
{
158158
selectedFeatureIds << masterModel()->rowToId( selectedModelIdx.row() );
159159
}
160160
}
161161

162-
foreach( QItemSelectionRange deselectedRange, deselected )
162+
foreach ( QItemSelectionRange deselectedRange, deselected )
163163
{
164-
foreach( QModelIndex deselectedModelIdx, deselectedRange.indexes() )
164+
foreach ( QModelIndex deselectedModelIdx, deselectedRange.indexes() )
165165
{
166166
deselectedFeatureIds << masterModel()->rowToId( deselectedModelIdx.row() );
167167
}
168168
}
169169

170170
// Change selection without emitting a signal
171-
foreach( QgsFeatureId seletedFid, selectedFeatureIds )
171+
foreach ( QgsFeatureId seletedFid, selectedFeatureIds )
172172
{
173173
layer()->select( seletedFid, false );
174174
}
175-
foreach( QgsFeatureId deselectedFid, deselectedFeatureIds )
175+
foreach ( QgsFeatureId deselectedFid, deselectedFeatureIds )
176176
{
177177
layer()->deselect( deselectedFid, false );
178178
}

src/gui/attributetable/qgsattributetablemodel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <limits>
3232

3333
QgsAttributeTableModel::QgsAttributeTableModel( QgsVectorLayerCache *layerCache, QObject *parent )
34-
: QAbstractTableModel( parent ),
34+
: QAbstractTableModel( parent ),
3535
mLayerCache( layerCache )
3636
{
3737
QgsDebugMsg( "entered." );
@@ -52,7 +52,7 @@ QgsAttributeTableModel::~QgsAttributeTableModel()
5252
const QgsFields& fields = layer()->pendingFields();
5353
for ( int idx = 0; idx < fields.count(); ++idx )
5454
{
55-
if ( layer()->editType( idx ) != QgsVectorLayer::ValueRelation )
55+
if ( layer()->editType( idx ) != QgsVectorLayer::ValueRelation )
5656
continue;
5757

5858
delete mValueMaps.take( idx );

0 commit comments

Comments
 (0)