Skip to content

Commit 93cdd0c

Browse files
committedSep 8, 2013
indentation update
1 parent c9fe92c commit 93cdd0c

File tree

9 files changed

+36
-31
lines changed

9 files changed

+36
-31
lines changed
 

‎python/plugins/processing/saga/SagaAlgorithmProvider.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ def unload(self):
6767
ProcessingConfig.removeSetting(SagaUtils.SAGA_RESAMPLING_REGION_CELLSIZE)
6868
ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_CONSOLE)
6969
ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_COMMANDS)
70-
7170

72-
def _loadAlgorithms(self):
71+
72+
def _loadAlgorithms(self):
7373
self.algs = []
74-
saga208 = ProcessingConfig.getSetting(SagaUtils.SAGA_208)
74+
saga208 = ProcessingConfig.getSetting(SagaUtils.SAGA_208)
7575
folder = SagaUtils.sagaDescriptionPath()
7676
for descriptionFile in os.listdir(folder):
77-
if descriptionFile.endswith("txt"):
77+
if descriptionFile.endswith("txt"):
7878
if not saga208:
7979
if descriptionFile.startswith("2.0.8"):
8080
continue
8181
else:
82-
if descriptionFile.startswith("2.1"):
82+
if descriptionFile.startswith("2.1"):
8383
continue
8484
try:
8585
alg = SagaAlgorithm(os.path.join(folder, descriptionFile))

‎src/analysis/openstreetmap/qgsosmdatabase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ void QgsOSMDatabase::exportSpatiaLiteNodes( const QString& tableName, const QStr
421421
sqlite3_bind_null( stmtInsert, ++col );
422422
}
423423

424-
sqlite3_bind_blob( stmtInsert, ++col, geom->asWkb(), (int) geom->wkbSize(), SQLITE_STATIC );
424+
sqlite3_bind_blob( stmtInsert, ++col, geom->asWkb(), ( int ) geom->wkbSize(), SQLITE_STATIC );
425425

426426
int insertRes = sqlite3_step( stmtInsert );
427427
if ( insertRes != SQLITE_DONE )
@@ -489,7 +489,7 @@ void QgsOSMDatabase::exportSpatiaLiteWays( bool closed, const QString& tableName
489489
sqlite3_bind_null( stmtInsert, ++col );
490490
}
491491

492-
sqlite3_bind_blob( stmtInsert, ++col, geom->asWkb(), (int) geom->wkbSize(), SQLITE_STATIC );
492+
sqlite3_bind_blob( stmtInsert, ++col, geom->asWkb(), ( int ) geom->wkbSize(), SQLITE_STATIC );
493493

494494
int insertRes = sqlite3_step( stmtInsert );
495495
if ( insertRes != SQLITE_DONE )

‎src/core/composer/qgscomposermap.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141

4242
QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int width, int height )
4343
: QgsComposerItem( x, y, width, height, composition ), mKeepLayerSet( false ),
44-
mOverviewFrameMapId( -1 ), mOverviewBlendMode( QPainter::CompositionMode_SourceOver ), mOverviewInverted( false ), mOverviewCentered( false ),
45-
mGridEnabled( false ), mGridStyle( Solid ),
44+
mOverviewFrameMapId( -1 ), mOverviewBlendMode( QPainter::CompositionMode_SourceOver ), mOverviewInverted( false ), mOverviewCentered( false ),
45+
mGridEnabled( false ), mGridStyle( Solid ),
4646
mGridIntervalX( 0.0 ), mGridIntervalY( 0.0 ), mGridOffsetX( 0.0 ), mGridOffsetY( 0.0 ), mGridAnnotationFontColor( QColor( 0, 0, 0 ) ),
4747
mGridAnnotationPrecision( 3 ), mShowGridAnnotation( false ), mGridBlendMode( QPainter::CompositionMode_SourceOver ),
4848
mLeftGridAnnotationPosition( OutsideMapFrame ), mRightGridAnnotationPosition( OutsideMapFrame ),
@@ -87,8 +87,8 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int w
8787

8888
QgsComposerMap::QgsComposerMap( QgsComposition *composition )
8989
: QgsComposerItem( 0, 0, 10, 10, composition ), mKeepLayerSet( false ), mOverviewFrameMapId( -1 ),
90-
mOverviewBlendMode( QPainter::CompositionMode_SourceOver ), mOverviewInverted( false ), mOverviewCentered( false ),
91-
mGridEnabled( false ), mGridStyle( Solid ),
90+
mOverviewBlendMode( QPainter::CompositionMode_SourceOver ), mOverviewInverted( false ), mOverviewCentered( false ),
91+
mGridEnabled( false ), mGridStyle( Solid ),
9292
mGridIntervalX( 0.0 ), mGridIntervalY( 0.0 ), mGridOffsetX( 0.0 ), mGridOffsetY( 0.0 ), mGridAnnotationFontColor( QColor( 0, 0, 0 ) ),
9393
mGridAnnotationPrecision( 3 ), mShowGridAnnotation( false ), mGridBlendMode( QPainter::CompositionMode_SourceOver ),
9494
mLeftGridAnnotationPosition( OutsideMapFrame ), mRightGridAnnotationPosition( OutsideMapFrame ),
@@ -121,19 +121,21 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition )
121121
void QgsComposerMap::extentCenteredOnOverview( QgsRectangle& extent ) const
122122
{
123123
extent = mExtent;
124-
if ( ! mOverviewCentered ) {
124+
if ( ! mOverviewCentered )
125+
{
125126
return;
126127
}
127128

128-
if ( mOverviewFrameMapId != -1 ) {
129+
if ( mOverviewFrameMapId != -1 )
130+
{
129131
const QgsComposerMap* overviewFrameMap = mComposition->getComposerMapById( mOverviewFrameMapId );
130132
QgsRectangle otherExtent = overviewFrameMap->extent();
131133

132134
QgsPoint center = otherExtent.center();
133135
QgsRectangle movedExtent( center.x() - mExtent.width() / 2,
134-
center.y() - mExtent.height() / 2,
135-
center.x() - mExtent.width() / 2 + mExtent.width(),
136-
center.y() - mExtent.height() / 2 + mExtent.height() );
136+
center.y() - mExtent.height() / 2,
137+
center.x() - mExtent.width() / 2 + mExtent.width(),
138+
center.y() - mExtent.height() / 2 + mExtent.height() );
137139
extent = movedExtent;
138140
}
139141
}

‎src/core/qgsvectorfilewriter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ OGRFeatureH QgsVectorFileWriter::createFeature( QgsFeature& feature )
669669
return 0;
670670
}
671671

672-
OGRErr err = OGR_G_ImportFromWkb( mGeom2, const_cast<unsigned char *>( geom->asWkb() ), (int) geom->wkbSize() );
672+
OGRErr err = OGR_G_ImportFromWkb( mGeom2, const_cast<unsigned char *>( geom->asWkb() ), ( int ) geom->wkbSize() );
673673
if ( err != OGRERR_NONE )
674674
{
675675
mErrorMessage = QObject::tr( "Feature geometry not imported (OGR error: %1)" )
@@ -685,7 +685,7 @@ OGRFeatureH QgsVectorFileWriter::createFeature( QgsFeature& feature )
685685
}
686686
else if ( geom )
687687
{
688-
OGRErr err = OGR_G_ImportFromWkb( mGeom, const_cast<unsigned char *>( geom->asWkb() ), (int) geom->wkbSize() );
688+
OGRErr err = OGR_G_ImportFromWkb( mGeom, const_cast<unsigned char *>( geom->asWkb() ), ( int ) geom->wkbSize() );
689689
if ( err != OGRERR_NONE )
690690
{
691691
mErrorMessage = QObject::tr( "Feature geometry not imported (OGR error: %1)" )

‎src/core/raster/qgsrasterblock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ bool QgsRasterBlock::isNoData( size_t index )
324324
return false;
325325
}
326326
// TODO: optimize
327-
int row = (int) index / mWidth;
327+
int row = ( int ) index / mWidth;
328328
int column = index % mWidth;
329329
size_t byte = ( size_t )row * mNoDataBitmapWidth + column / 8 ;
330330
int bit = column % 8;
@@ -406,7 +406,7 @@ bool QgsRasterBlock::setIsNoData( size_t index )
406406
}
407407
}
408408
// TODO: optimize
409-
int row = (int) index / mWidth;
409+
int row = ( int ) index / mWidth;
410410
int column = index % mWidth;
411411
size_t byte = ( size_t )row * mNoDataBitmapWidth + column / 8;
412412
int bit = column % 8;

‎src/providers/postgres/qgspostgresconn.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ void QgsPostgresConn::addColumnInfo( QgsPostgresLayerProperty& layerProperty, co
277277
// could use array_agg() and count()
278278
// array output would look like this: "{One,tWo}"
279279
QString sql = QString( "SELECT attname, CASE WHEN typname = ANY(ARRAY['geometry','geography','topogeometry']) THEN 1 ELSE null END AS isSpatial FROM pg_attribute JOIN pg_type ON atttypid=pg_type.oid WHERE attrelid=regclass('%1.%2')" )
280-
.arg( quotedIdentifier( schemaName ) )
281-
.arg( quotedIdentifier( viewName ) );
280+
.arg( quotedIdentifier( schemaName ) )
281+
.arg( quotedIdentifier( viewName ) );
282282
QgsDebugMsg( sql );
283283
QgsPostgresResult colRes = PQexec( sql );
284284

@@ -288,12 +288,14 @@ void QgsPostgresConn::addColumnInfo( QgsPostgresLayerProperty& layerProperty, co
288288
{
289289
for ( int i = 0; i < colRes.PQntuples(); i++ )
290290
{
291-
if ( fetchPkCandidates ) {
291+
if ( fetchPkCandidates )
292+
{
292293
QgsDebugMsg( colRes.PQgetvalue( i, 0 ) );
293294
layerProperty.pkCols << colRes.PQgetvalue( i, 0 );
294295
}
295296

296-
if ( colRes.PQgetisnull( i, 1 ) == 0 ) {
297+
if ( colRes.PQgetisnull( i, 1 ) == 0 )
298+
{
297299
++layerProperty.nSpCols;
298300
}
299301
}

‎src/providers/postgres/qgspostgresconn.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ struct QgsPostgresLayerProperty
6060
// TODO: rename this !
6161
int size() const { Q_ASSERT( types.size() == srids.size() ); return types.size(); }
6262

63-
QString defaultName() const {
63+
QString defaultName() const
64+
{
6465
QString n = tableName;
6566
if ( nSpCols > 1 ) n += "." + geometryColName;
6667
return n;

‎src/providers/postgres/qgspostgresfeatureiterator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause )
275275
query += QString( "%1(%2(%3%4),'%5')" )
276276
.arg( P->mConnectionRO->majorVersion() < 2 ? "asbinary" : "st_asbinary" )
277277
.arg( P->mConnectionRO->majorVersion() < 2 ? "force_2d"
278-
: P->mConnectionRO->majorVersion() > 2 || P->mConnectionRO->minorVersion() > 0 ? "ST_Force2D"
279-
: "st_force_2d" )
278+
: P->mConnectionRO->majorVersion() > 2 || P->mConnectionRO->minorVersion() > 0 ? "st_force2d"
279+
: "st_force_2d" )
280280
.arg( P->quotedIdentifier( P->mGeometryColumn ) )
281281
.arg( P->mSpatialColType == sctGeography ? "::geometry" : "" )
282282
.arg( P->endianString() );

‎tests/src/app/testqgisappclipboard.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void TestQgisAppClipboard::copyPaste()
6969
{
7070
qDebug() << "TestQgisAppClipboard::copyPaste()";
7171

72-
QMap<QString,int> filesCounts;
72+
QMap<QString, int> filesCounts;
7373
filesCounts.insert( "points.shp", 17 );
7474
filesCounts.insert( "lines.shp", 6 );
7575
filesCounts.insert( "polys.shp", 10 );
@@ -79,7 +79,7 @@ void TestQgisAppClipboard::copyPaste()
7979
// add vector layer
8080
QString filePath = mTestDataDir + fileName;
8181
qDebug() << "add vector layer: " << filePath;
82-
QgsVectorLayer *inputLayer = mQgisApp->addVectorLayer ( filePath, fileName, "ogr" );
82+
QgsVectorLayer *inputLayer = mQgisApp->addVectorLayer( filePath, fileName, "ogr" );
8383
QVERIFY( inputLayer->isValid() );
8484

8585
// copy all features to clipboard
@@ -89,13 +89,13 @@ void TestQgisAppClipboard::copyPaste()
8989
QgsFeatureList features = mQgisApp->clipboard()->copyOf();
9090
qDebug() << features.size() << " features copied to clipboard";
9191

92-
QVERIFY( features.size() == filesCounts.value(fileName) );
92+
QVERIFY( features.size() == filesCounts.value( fileName ) );
9393

9494
QgsVectorLayer *pastedLayer = mQgisApp->pasteAsNewMemoryVector( "pasted" );
9595
QVERIFY( pastedLayer );
9696
QVERIFY( pastedLayer->isValid() );
9797
qDebug() << pastedLayer->featureCount() << " features in pasted layer";
98-
QVERIFY( pastedLayer->featureCount() == filesCounts.value(fileName) );
98+
QVERIFY( pastedLayer->featureCount() == filesCounts.value( fileName ) );
9999
}
100100
}
101101

0 commit comments

Comments
 (0)
Please sign in to comment.