Skip to content

Commit 24acebe

Browse files
committed
indentation update
1 parent bf45669 commit 24acebe

27 files changed

+255
-251
lines changed

python/plugins/processing/algs/JoinAttributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def processAlgorithm(self, progress):
7575
joinField2Index = layer2.fieldNameIndex(field2)
7676

7777
# Output
78-
outFields = vector.combineVectorFields(layer,layer2)
78+
outFields = vector.combineVectorFields(layer,layer2)
7979

8080
writer = output.getVectorWriter(outFields, provider.geometryType(),
8181
layer.crs())

src/app/qgsoptions.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,9 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
561561
chkUseRenderCaching->setChecked( settings.value( "/qgis/enable_render_caching", false ).toBool() );
562562

563563
// Default simplify drawing configuration
564-
mSimplifyDrawingGroupBox->setChecked( settings.value( "/qgis/simplifyDrawingHints", (int)QgsVectorLayer::DefaultSimplification ).toInt() != QgsVectorLayer::NoSimplification );
565-
mSimplifyDrawingSlider->setValue( (int)(5.0f * (settings.value( "/qgis/simplifyDrawingTol", QGis::DEFAULT_MAPTOPIXEL_THRESHOLD ).toFloat()-1)) );
566-
mSimplifyDrawingPanel->setVisible( mSimplifyDrawingSlider->value()>0 );
564+
mSimplifyDrawingGroupBox->setChecked( settings.value( "/qgis/simplifyDrawingHints", ( int )QgsVectorLayer::DefaultSimplification ).toInt() != QgsVectorLayer::NoSimplification );
565+
mSimplifyDrawingSlider->setValue(( int )( 5.0f * ( settings.value( "/qgis/simplifyDrawingTol", QGis::DEFAULT_MAPTOPIXEL_THRESHOLD ).toFloat() - 1 ) ) );
566+
mSimplifyDrawingPanel->setVisible( mSimplifyDrawingSlider->value() > 0 );
567567

568568
// Slightly awkard here at the settings value is true to use QImage,
569569
// but the checkbox is true to use QPixmap
@@ -2080,6 +2080,6 @@ void QgsOptions::saveDefaultDatumTransformations()
20802080

20812081
void QgsOptions::on_mSimplifyDrawingSlider_valueChanged( int value )
20822082
{
2083-
mSimplifyDrawingPanel->setVisible( value>0 );
2083+
mSimplifyDrawingPanel->setVisible( value > 0 );
20842084
}
20852085

src/app/qgsvectorlayerproperties.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ void QgsVectorLayerProperties::syncToLayer( void )
394394

395395
// get simplify drawing configuration
396396
mSimplifyDrawingGroupBox->setChecked( layer->simplifyDrawingHints() != QgsVectorLayer::NoSimplification );
397-
mSimplifyDrawingSlider->setValue( (int)(5.0f * (layer->simplifyDrawingTol()-1)) );
398-
mSimplifyDrawingPanel->setVisible( mSimplifyDrawingSlider->value()>0 );
397+
mSimplifyDrawingSlider->setValue(( int )( 5.0f * ( layer->simplifyDrawingTol() - 1 ) ) );
398+
mSimplifyDrawingPanel->setVisible( mSimplifyDrawingSlider->value() > 0 );
399399

400400
// load appropriate symbology page (V1 or V2)
401401
updateSymbologyPage();
@@ -1085,5 +1085,5 @@ void QgsVectorLayerProperties::on_mMaximumScaleSetCurrentPushButton_clicked()
10851085

10861086
void QgsVectorLayerProperties::on_mSimplifyDrawingSlider_valueChanged( int value )
10871087
{
1088-
mSimplifyDrawingPanel->setVisible( value>0 );
1088+
mSimplifyDrawingPanel->setVisible( value > 0 );
10891089
}

src/core/qgsclipper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ const unsigned char* QgsClipper::clippedLineWKB( const unsigned char* wkb, const
4545

4646
bool hasZValue = ( wkbType == QGis::WKBLineString25D );
4747

48-
int sizeOfDoubleX = sizeof(double);
49-
int sizeOfDoubleY = hasZValue ? 2*sizeof(double) : sizeof(double);
48+
int sizeOfDoubleX = sizeof( double );
49+
int sizeOfDoubleY = hasZValue ? 2 * sizeof( double ) : sizeof( double );
5050

5151
double p0x, p0y, p1x = 0.0, p1y = 0.0; //original coordinates
5252
double p1x_c, p1y_c; //clipped end coordinates

src/core/qgscoordinatereferencesystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,7 @@ int QgsCoordinateReferenceSystem::syncDb()
16821682

16831683
int inserted = 0, updated = 0, deleted = 0, errors = 0;
16841684

1685-
qDebug( "Load srs db from: %s", QgsApplication::srsDbFilePath().toLocal8Bit().constData());
1685+
qDebug( "Load srs db from: %s", QgsApplication::srsDbFilePath().toLocal8Bit().constData() );
16861686

16871687
sqlite3 *database;
16881688
if ( sqlite3_open( dbFilePath.toUtf8().constData(), &database ) != SQLITE_OK )

src/core/qgscoordinatetransform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ void QgsCoordinateTransform::transformCoords( const int& numPoints, double *x, d
657657
}
658658
}
659659

660-
dir = (direction == ForwardTransform) ? tr( "forward transform" ) : tr( "inverse transform" );
660+
dir = ( direction == ForwardTransform ) ? tr( "forward transform" ) : tr( "inverse transform" );
661661

662662
QString msg = tr( "%1 of\n"
663663
"%2"

src/core/qgsfeaturerequest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,19 +190,19 @@ bool QgsFeatureRequest::acceptFeature( const QgsFeature& feature )
190190
return true;
191191
}
192192

193-
QgsFeatureRequest& QgsFeatureRequest::setCoordinateTransform( const QgsCoordinateTransform* ct )
193+
QgsFeatureRequest& QgsFeatureRequest::setCoordinateTransform( const QgsCoordinateTransform* ct )
194194
{
195195
mMapCoordTransform = ct;
196196
return *this;
197197
}
198198

199-
QgsFeatureRequest& QgsFeatureRequest::setMapToPixel( const QgsMapToPixel* mtp )
199+
QgsFeatureRequest& QgsFeatureRequest::setMapToPixel( const QgsMapToPixel* mtp )
200200
{
201201
mMapToPixel = mtp;
202202
return *this;
203203
}
204204

205-
QgsFeatureRequest& QgsFeatureRequest::setMapToPixelTol( float map2pixelTol )
205+
QgsFeatureRequest& QgsFeatureRequest::setMapToPixelTol( float map2pixelTol )
206206
{
207207
mMapToPixelTol = map2pixelTol;
208208
return *this;

src/core/qgsfeaturerequest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class CORE_EXPORT QgsFeatureRequest
142142

143143
const QgsCoordinateTransform* coordinateTransform() const { return mMapCoordTransform; }
144144
QgsFeatureRequest& setCoordinateTransform( const QgsCoordinateTransform* ct );
145-
145+
146146
const QgsMapToPixel* mapToPixel() const { return mMapToPixel; }
147147
QgsFeatureRequest& setMapToPixel( const QgsMapToPixel* mtp );
148148

@@ -159,7 +159,7 @@ class CORE_EXPORT QgsFeatureRequest
159159
QgsAttributeList mAttrs;
160160

161161
//! For transformation between coordinate systems from current layer to map target. Can be 0 if on-the-fly reprojection is not used
162-
const QgsCoordinateTransform* mMapCoordTransform;
162+
const QgsCoordinateTransform* mMapCoordTransform;
163163
//! For transformation between map coordinates and device coordinates
164164
const QgsMapToPixel* mMapToPixel;
165165
//! Factor tolterance to apply in transformation between map coordinates and device coordinates

src/core/qgsgeometrysimplifier.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
//! Returns whether the device-envelope can be replaced by its BBOX when is applied the specified tolerance
2121
bool QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox( const QgsRectangle& envelope, float mapToPixelTol )
2222
{
23-
return (envelope.xMaximum()-envelope.xMinimum()) < mapToPixelTol && (envelope.yMaximum()-envelope.yMinimum()) < mapToPixelTol;
23+
return ( envelope.xMaximum() - envelope.xMinimum() ) < mapToPixelTol && ( envelope.yMaximum() - envelope.yMinimum() ) < mapToPixelTol;
2424
}
2525

2626
//! Returns whether the device-geometry can be replaced by its BBOX when is applied the specified tolerance
2727
bool QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox( const QVector<QPointF>& points, float mapToPixelTol )
2828
{
29-
double xmin = std::numeric_limits<double>::max(), x,y;
29+
double xmin = std::numeric_limits<double>::max(), x, y;
3030
double ymin = std::numeric_limits<double>::max();
3131
double xmax = -std::numeric_limits<double>::max();
3232
double ymax = -std::numeric_limits<double>::max();
@@ -36,10 +36,10 @@ bool QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox( const Q
3636
x = points[i].x();
3737
y = points[i].y();
3838

39-
if (xmin>x) xmin = x;
40-
if (ymin>y) ymin = y;
41-
if (xmax<x) xmax = x;
42-
if (ymax<y) ymax = y;
39+
if ( xmin > x ) xmin = x;
40+
if ( ymin > y ) ymin = y;
41+
if ( xmax < x ) xmax = x;
42+
if ( ymax < y ) ymax = y;
4343
}
4444
return canbeGeneralizedByDeviceBoundingBox( QgsRectangle( xmin, ymin, xmax, ymax ), mapToPixelTol );
4545
}
@@ -69,7 +69,7 @@ bool QgsTopologyPreservingSimplifier::simplifyGeometry( QgsGeometry* geometry )
6969
if ( g )
7070
{
7171
size_t wkbSize = g->wkbSize();
72-
unsigned char* wkb = (unsigned char*)malloc( wkbSize );
72+
unsigned char* wkb = ( unsigned char* )malloc( wkbSize );
7373
memcpy( wkb, g->asWkb(), wkbSize );
7474
geometry->fromWkb( wkb, wkbSize );
7575
delete g;

src/core/qgsgeometrysimplifier.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CORE_EXPORT QgsAbstractGeometrySimplifier
3030
//! Simplifies the specified geometry
3131
virtual bool simplifyGeometry( QgsGeometry* geometry ) = 0;
3232

33-
// MapToPixel simplification helper methods
33+
// MapToPixel simplification helper methods
3434
public:
3535
//! Returns whether the device-envelope can be replaced by its BBOX when is applied the specified tolerance
3636
static bool canbeGeneralizedByDeviceBoundingBox( const QgsRectangle& envelope, float mapToPixelTol = 1.0f );
@@ -42,7 +42,7 @@ class CORE_EXPORT QgsAbstractGeometrySimplifier
4242
/**
4343
* Implementation of GeometrySimplifier using the Douglas-Peucker algorithm
4444
*
45-
* Simplifies a geometry, ensuring that the result is a valid geometry having the same dimension and number of components as the input.
45+
* Simplifies a geometry, ensuring that the result is a valid geometry having the same dimension and number of components as the input.
4646
* The simplification uses a maximum distance difference algorithm similar to the one used in the Douglas-Peucker algorithm.
4747
*/
4848
class CORE_EXPORT QgsTopologyPreservingSimplifier : public QgsAbstractGeometrySimplifier

0 commit comments

Comments
 (0)