Skip to content

Commit bff64fd

Browse files
committed
indentation update
1 parent e6561ce commit bff64fd

File tree

66 files changed

+122
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+122
-114
lines changed

python/core/qgsdatadefined.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class QgsDataDefined
5757

5858
// @note not available in python bindings
5959
//QMap< QString, QString > toMap();
60-
60+
6161
/**Returns a DOM element containing the properties of the data defined container.
6262
* @param DOM document
6363
* @param elementName name for DOM element
@@ -75,7 +75,7 @@ class QgsDataDefined
7575
* @see toXmlElement
7676
*/
7777
bool setFromXmlElement( const QDomElement& element );
78-
78+
7979
bool operator==( const QgsDataDefined &other ) const;
8080
bool operator!=( const QgsDataDefined &other ) const;
8181

python/plugins/db_manager/dlg_sql_window.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ def clearSql(self):
130130
self.editSql.setFocus()
131131

132132
def executeSql(self):
133-
133+
134134
sql = ""
135135
if self.editSql.hasSelectedText():
136136
sql = self.editSql.selectedText()
137137
else:
138138
sql = self.editSql.text()
139-
139+
140140
if sql == "":
141141
return
142142

src/app/qgisapp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
153153
/** Returns and adjusted uri for the layer based on current and available CRS as well as the last selected image format
154154
* @note added in 2.4
155155
*/
156-
QString crsAndFormatAdjustedLayerUri(const QString& uri, const QStringList& supportedCrs, const QStringList& supportedFormats) const;
156+
QString crsAndFormatAdjustedLayerUri( const QString& uri, const QStringList& supportedCrs, const QStringList& supportedFormats ) const;
157157

158158
/** Add a 'pre-made' map layer to the project */
159159
void addMapLayer( QgsMapLayer *theMapLayer );

src/app/qgisappinterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ QgisAppInterface::QgisAppInterface( QgisApp * _qgis )
6666
connect( qgis, SIGNAL( projectRead() ),
6767
this, SIGNAL( projectRead() ) );
6868
connect( qgis, SIGNAL( layerSavedAs( QgsMapLayer*, QString ) ),
69-
this, SIGNAL( layerSavedAs(QgsMapLayer*, QString ) ) );
69+
this, SIGNAL( layerSavedAs( QgsMapLayer*, QString ) ) );
7070
}
7171

7272
QgisAppInterface::~QgisAppInterface()

src/app/qgsadvanceddigitizingcanvasitem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class QgsAdvancedDigitizingDockWidget;
2828
class APP_EXPORT QgsAdvancedDigitizingCanvasItem : public QgsMapCanvasItem
2929
{
3030
public:
31-
explicit QgsAdvancedDigitizingCanvasItem(QgsMapCanvas* canvas, QgsAdvancedDigitizingDockWidget* cadDockWidget );
31+
explicit QgsAdvancedDigitizingCanvasItem( QgsMapCanvas* canvas, QgsAdvancedDigitizingDockWidget* cadDockWidget );
3232

3333
void paint( QPainter *painter );
3434

src/astyle/ASBeautifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ string ASBeautifier::beautify(const string &originalLine)
636636
{
637637
string line;
638638
bool isInLineComment = false;
639-
bool lineStartsInComment = false;
639+
bool lineStartsInComment;
640640
bool isInClass = false;
641641
bool isInSwitch = false;
642642
bool isImmediatelyAfterConst = false;

src/core/qgsexpression.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,13 +1370,15 @@ static QVariant fcnIf( const QVariantList &values, const QgsFeature *f, QgsExpre
13701370
ENSURE_NO_EVAL_ERROR;
13711371
QVariant value = node->eval( parent, f );
13721372
ENSURE_NO_EVAL_ERROR;
1373-
if ( value.toBool() ) {
1373+
if ( value.toBool() )
1374+
{
13741375
node = getNode( values.at( 1 ), parent );
13751376
ENSURE_NO_EVAL_ERROR;
13761377
value = node->eval( parent, f );
13771378
ENSURE_NO_EVAL_ERROR;
13781379
}
1379-
else {
1380+
else
1381+
{
13801382
node = getNode( values.at( 2 ), parent );
13811383
ENSURE_NO_EVAL_ERROR;
13821384
value = node->eval( parent, f );
@@ -2565,15 +2567,17 @@ QVariant QgsExpression::NodeFunction::eval( QgsExpression* parent, const QgsFeat
25652567
foreach ( Node* n, mArgs->list() )
25662568
{
25672569
QVariant v;
2568-
if ( fd->lazyEval() ) {
2570+
if ( fd->lazyEval() )
2571+
{
25692572
// Pass in the node for the function to eval as it needs.
25702573
v = QVariant::fromValue( n );
25712574
}
2572-
else {
2575+
else
2576+
{
25732577
v = n->eval( parent, f );
25742578
ENSURE_NO_EVAL_ERROR;
25752579
if ( isNull( v ) && fd->name() != "coalesce" )
2576-
return QVariant(); // all "normal" functions return NULL, when any parameter is NULL (so coalesce is abnormal)
2580+
return QVariant(); // all "normal" functions return NULL, when any parameter is NULL (so coalesce is abnormal)
25772581
}
25782582
argValues.append( v );
25792583
}

src/core/qgslogger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "qgsconfig.h"
2727

2828
#ifndef CMAKE_SOURCE_DIR
29-
#error CMAKE_SOURCE_DIR undefinied
29+
#error CMAKE_SOURCE_DIR undefined
3030
#endif // CMAKE_SOURCE_DIR
3131

3232
int QgsLogger::sDebugLevel = -999; // undefined value

src/core/qgsmapsettings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ void QgsMapSettings::updateDerived()
166166
visibleExtent().center().y(),
167167
outputSize().width(),
168168
outputSize().height(),
169-
mRotation);
169+
mRotation );
170170

171171
#if 1 // set visible extent taking rotation in consideration
172172
if ( mRotation )

src/core/qgspallabeling.cpp

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4127,18 +4127,20 @@ void QgsPalLabeling::drawLabelCandidateRect( pal::LabelPosition* lp, QPainter* p
41274127
#if 1 // TODO: generalize some of this
41284128
double w = lp->getWidth();
41294129
double h = lp->getHeight();
4130-
double cx = lp->getX() + w/2.0;
4131-
double cy = lp->getY() + h/2.0;
4132-
double scale = 1.0/xform->mapUnitsPerPixel();
4130+
double cx = lp->getX() + w / 2.0;
4131+
double cy = lp->getY() + h / 2.0;
4132+
double scale = 1.0 / xform->mapUnitsPerPixel();
41334133
double rotation = xform->mapRotation();
41344134
double sw = w * scale;
41354135
double sh = h * scale;
4136-
QRectF rect( -sw/2, -sh/2, sw, sh );
4136+
QRectF rect( -sw / 2, -sh / 2, sw, sh );
41374137

4138-
painter->translate( xform->transform( QPointF(cx, cy) ).toQPointF() );
4139-
if ( rotation ) {
4138+
painter->translate( xform->transform( QPointF( cx, cy ) ).toQPointF() );
4139+
if ( rotation )
4140+
{
41404141
// Only if not horizontal
4141-
if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ ) {
4142+
if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ )
4143+
{
41424144
painter->rotate( rotation );
41434145
}
41444146
}
@@ -4204,7 +4206,7 @@ void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QgsRenderContext& con
42044206
}
42054207

42064208
else if ( drawType == QgsPalLabeling::LabelBuffer
4207-
|| drawType == QgsPalLabeling::LabelText )
4209+
|| drawType == QgsPalLabeling::LabelText )
42084210
{
42094211

42104212
// TODO: optimize access :)
@@ -4290,17 +4292,19 @@ void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QgsRenderContext& con
42904292
LabelPosition* lp = label;
42914293
double w = lp->getWidth();
42924294
double h = lp->getHeight();
4293-
double cx = lp->getX() + w/2.0;
4294-
double cy = lp->getY() + h/2.0;
4295-
double scale = 1.0/xform->mapUnitsPerPixel();
4295+
double cx = lp->getX() + w / 2.0;
4296+
double cy = lp->getY() + h / 2.0;
4297+
double scale = 1.0 / xform->mapUnitsPerPixel();
42964298
double rotation = xform->mapRotation();
42974299
double sw = w * scale;
42984300
double sh = h * scale;
4299-
QRectF rect( -sw/2, -sh/2, sw, sh );
4300-
painter->translate( xform->transform( QPointF(cx, cy) ).toQPointF() );
4301-
if ( rotation ) {
4301+
QRectF rect( -sw / 2, -sh / 2, sw, sh );
4302+
painter->translate( xform->transform( QPointF( cx, cy ) ).toQPointF() );
4303+
if ( rotation )
4304+
{
43024305
// Only if not horizontal
4303-
if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ ) {
4306+
if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ )
4307+
{
43044308
painter->rotate( rotation );
43054309
}
43064310
}

src/core/qgssnapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ QgsSnapper::~QgsSnapper()
4444
int QgsSnapper::snapPoint( const QPoint& startPoint, QList<QgsSnappingResult>& snappingResult, const QList<QgsPoint>& excludePoints )
4545
{
4646
QgsPoint mapCoordPoint = mMapSettings.mapToPixel().toMapCoordinates( startPoint.x(), startPoint.y() );
47-
return snapPoint( mapCoordPoint, snappingResult, excludePoints);
47+
return snapPoint( mapCoordPoint, snappingResult, excludePoints );
4848
}
4949

5050
int QgsSnapper::snapPoint( const QgsPoint& mapCoordPoint, QList<QgsSnappingResult>& snappingResult, const QList<QgsPoint>& excludePoints )
51-
{
51+
{
5252
snappingResult.clear();
5353

5454
QMultiMap<double, QgsSnappingResult> snappingResultList;//all snapping results

src/gui/qgsmapcanvas.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,9 +726,9 @@ void QgsMapCanvas::rendererJobFinished()
726726
// This is an hack to pass QgsMapCanvasItem::setRect what it
727727
// expects (encoding of position and size of the item)
728728
const QgsMapToPixel& m2p = mSettings.mapToPixel();
729-
QgsPoint topLeft = m2p.toMapPoint(0,0);
729+
QgsPoint topLeft = m2p.toMapPoint( 0, 0 );
730730
double res = m2p.mapUnitsPerPixel();
731-
QgsRectangle rect(topLeft.x(), topLeft.y(), topLeft.x() + img.width()*res, topLeft.y() - img.height()*res);
731+
QgsRectangle rect( topLeft.x(), topLeft.y(), topLeft.x() + img.width()*res, topLeft.y() - img.height()*res );
732732

733733
mMap->setContent( img, rect );
734734
}

src/gui/qgsmapcanvasitem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ void QgsMapCanvasItem::setRect( const QgsRectangle& rect )
8383
{
8484
// rect encodes origin of the item (xMin,yMax from map to canvas units)
8585
// and size (rect size / map units per pixel)
86-
r.setTopLeft( toCanvasCoordinates( QPointF(mRect.xMinimum(), mRect.yMaximum()) ) );
86+
r.setTopLeft( toCanvasCoordinates( QPointF( mRect.xMinimum(), mRect.yMaximum() ) ) );
8787
const QgsMapToPixel* m2p = mMapCanvas->getCoordinateTransform();
8888
double res = m2p->mapUnitsPerPixel();
89-
r.setSize( QSizeF(mRect.width()/res, mRect.height()/res) );
89+
r.setSize( QSizeF( mRect.width() / res, mRect.height() / res ) );
9090
}
9191

9292
// set position in canvas where the item will have coordinate (0,0)

src/gui/qgsmapcanvassnapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ int QgsMapCanvasSnapper::snapToCurrentLayer( const QPoint& p, QList<QgsSnappingR
117117
int QgsMapCanvasSnapper::snapToBackgroundLayers( const QPoint& p, QList<QgsSnappingResult>& results, const QList<QgsPoint>& excludePoints )
118118
{
119119
const QgsPoint mapCoordPoint = mMapCanvas->mapSettings().mapToPixel().toMapCoordinates( p.x(), p.y() );
120-
return snapToBackgroundLayers(mapCoordPoint,results,excludePoints);
120+
return snapToBackgroundLayers( mapCoordPoint, results, excludePoints );
121121
}
122122

123123
int QgsMapCanvasSnapper::snapToBackgroundLayers( const QgsPoint& point, QList<QgsSnappingResult>& results, const QList<QgsPoint>& excludePoints )

src/providers/grass/qgis.g.info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ int main( int argc, char **argv )
212212
G_get_cellhd( rast_opt->answer, "", &window );
213213
G_set_window( &window );
214214
fd = G_open_cell_old( rast_opt->answer, "" );
215-
// wait for coors from stdin
215+
// wait for coords from stdin
216216
while ( fgets( buff, 100, stdin ) != 0 )
217217
{
218218
if ( sscanf( buff, "%lf%lf", &x, &y ) != 2 )

tests/src/analysis/testqgsvectoranalyzer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Email : sherman at mrcc dot com
1919
#include <qgsapplication.h>
2020
#include <qgsproviderregistry.h>
2121

22-
class TestQgsVectorAnalyzer: public QObject
22+
class TestQgsVectorAnalyzer : public QObject
2323
{
2424
Q_OBJECT
2525
private slots:

tests/src/analysis/testqgszonalstatistics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/** \ingroup UnitTests
2424
* This is a unit test for the zonal statistics class
2525
*/
26-
class TestQgsZonalStatistics: public QObject
26+
class TestQgsZonalStatistics : public QObject
2727
{
2828
Q_OBJECT
2929
private slots:

tests/src/app/testqgisappclipboard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/** \ingroup UnitTests
3434
* This is a unit test for the QgisApp clipboard.
3535
*/
36-
class TestQgisAppClipboard: public QObject
36+
class TestQgisAppClipboard : public QObject
3737
{
3838
Q_OBJECT
3939
private slots:

tests/src/core/regression992.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
/** \ingroup UnitTests
4141
* This is a regression test for ticket #992.
4242
*/
43-
class Regression992: public QObject
43+
class Regression992 : public QObject
4444
{
4545
Q_OBJECT
4646
private slots:

tests/src/core/testqgsatlascomposition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include <QtTest/QSignalSpy>
3434
#include <QtTest/QtTest>
3535

36-
class TestQgsAtlasComposition: public QObject
36+
class TestQgsAtlasComposition : public QObject
3737
{
3838
Q_OBJECT
3939
private slots:

tests/src/core/testqgsblendmodes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/** \ingroup UnitTests
3636
* This is a unit test for layer blend modes
3737
*/
38-
class TestQgsBlendModes: public QObject
38+
class TestQgsBlendModes : public QObject
3939
{
4040
Q_OBJECT
4141
private slots:

tests/src/core/testqgscomposerdd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <QObject>
3333
#include <QtTest/QtTest>
3434

35-
class TestQgsComposerDD: public QObject
35+
class TestQgsComposerDD : public QObject
3636
{
3737
Q_OBJECT
3838
private slots:

tests/src/core/testqgscomposereffects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <QColor>
2626
#include <QPainter>
2727

28-
class TestQgsComposerEffects: public QObject
28+
class TestQgsComposerEffects : public QObject
2929
{
3030
Q_OBJECT
3131
private slots:

tests/src/core/testqgscomposergroup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <QObject>
2323
#include <QtTest/QtTest>
2424

25-
class TestQgsComposerGroup: public QObject
25+
class TestQgsComposerGroup : public QObject
2626
{
2727
Q_OBJECT
2828
private slots:

tests/src/core/testqgscomposerhtml.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <QObject>
2525
#include <QtTest/QtTest>
2626

27-
class TestQgsComposerHtml: public QObject
27+
class TestQgsComposerHtml : public QObject
2828
{
2929
Q_OBJECT
3030
private slots:

tests/src/core/testqgscomposerlabel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <QObject>
2727
#include <QtTest/QtTest>
2828

29-
class TestQgsComposerLabel: public QObject
29+
class TestQgsComposerLabel : public QObject
3030
{
3131
Q_OBJECT
3232
private slots:

tests/src/core/testqgscomposermap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <QObject>
2727
#include <QtTest/QtTest>
2828

29-
class TestQgsComposerMap: public QObject
29+
class TestQgsComposerMap : public QObject
3030
{
3131
Q_OBJECT
3232
private slots:

tests/src/core/testqgscomposermapgrid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <QObject>
2727
#include <QtTest/QtTest>
2828

29-
class TestQgsComposerMapGrid: public QObject
29+
class TestQgsComposerMapGrid : public QObject
3030
{
3131
Q_OBJECT
3232
private slots:

tests/src/core/testqgscomposermapoverview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <QObject>
2929
#include <QtTest/QtTest>
3030

31-
class TestQgsComposerMapOverview: public QObject
31+
class TestQgsComposerMapOverview : public QObject
3232
{
3333
Q_OBJECT
3434
private slots:

tests/src/core/testqgscomposermodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <QtTest/QtTest>
2323
#include <QList>
2424

25-
class TestQgsComposerModel: public QObject
25+
class TestQgsComposerModel : public QObject
2626
{
2727
Q_OBJECT
2828

tests/src/core/testqgscomposermultiframe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <QObject>
2424
#include <QtTest/QtTest>
2525

26-
class TestQgsComposerMultiFrame: public QObject
26+
class TestQgsComposerMultiFrame : public QObject
2727
{
2828
Q_OBJECT
2929
private slots:

0 commit comments

Comments
 (0)