Skip to content

Commit 50cdcc3

Browse files
committedJan 14, 2012
indentation update
1 parent 96b5592 commit 50cdcc3

15 files changed

+48
-40
lines changed
 

‎scripts/astyle-all.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export elcr="$(tput el)$(tput cr)"
88

99
find src -type f -print | while read f; do
1010
case "$f" in
11-
src/app/gps/qwtpolar-*|src/core/spatialite/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
11+
src/app/gps/qwtpolar-*|src/app/qtmain_android.cpp|src/core/spatialite/*|src/core/spatialindex/src/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
1212
echo $f skipped
1313
continue
1414
;;
@@ -22,7 +22,7 @@ find src -type f -print | while read f; do
2222
;;
2323

2424
*)
25-
echo $f skipped
25+
echo -ne "$f skipped $elcr"
2626
continue
2727
;;
2828
esac

‎src/analysis/raster/qgshillshadefilter.cpp

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

2020
QgsHillshadeFilter::QgsHillshadeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, double lightAzimuth,
21-
double lightAngle): \
22-
QgsDerivativeFilter( inputFile, outputFile, outputFormat ), mLightAzimuth( lightAzimuth ), mLightAngle( lightAngle )
21+
double lightAngle )
22+
: QgsDerivativeFilter( inputFile, outputFile, outputFormat )
23+
, mLightAzimuth( lightAzimuth )
24+
, mLightAngle( lightAngle )
2325
{
2426
}
2527

2628
QgsHillshadeFilter::~QgsHillshadeFilter()
2729
{
2830
}
2931

30-
float QgsHillshadeFilter::processNineCellWindow( float* x11, float* x21, float* x31, \
31-
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
32+
float QgsHillshadeFilter::processNineCellWindow( float* x11, float* x21, float* x31,
33+
float* x12, float* x22, float* x32,
34+
float* x13, float* x23, float* x33 )
3235
{
3336
float derX = calcFirstDerX( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
3437
float derY = calcFirstDerY( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
@@ -42,13 +45,13 @@ float QgsHillshadeFilter::processNineCellWindow( float* x11, float* x21, float*
4245
float slope_rad = atan( sqrt( derX * derX + derY * derY ) );
4346
float azimuth_rad = mLightAzimuth * M_PI / 180.0;
4447
float aspect_rad = 0;
45-
if( derX == 0 && derY == 0 ) //aspect undefined, take a neutral value. Better solutions?
48+
if ( derX == 0 && derY == 0 ) //aspect undefined, take a neutral value. Better solutions?
4649
{
4750
aspect_rad = azimuth_rad / 2.0;
4851
}
4952
else
5053
{
5154
aspect_rad = M_PI + atan2( derX, derY );
5255
}
53-
return qMax( 0.0, 255.0 * ( ( cos( zenith_rad ) * cos( slope_rad ) ) + ( sin( zenith_rad ) * sin( slope_rad ) * cos( azimuth_rad - aspect_rad ) ) ) );
56+
return qMax( 0.0, 255.0 * (( cos( zenith_rad ) * cos( slope_rad ) ) + ( sin( zenith_rad ) * sin( slope_rad ) * cos( azimuth_rad - aspect_rad ) ) ) );
5457
}

‎src/analysis/raster/qgshillshadefilter.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ class ANALYSIS_EXPORT QgsHillshadeFilter: public QgsDerivativeFilter
2424
{
2525
public:
2626
QgsHillshadeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, double lightAzimuth = 300,
27-
double lightAngle = 40 );
27+
double lightAngle = 40 );
2828
~QgsHillshadeFilter();
2929

30-
/**Calculates output value from nine input values. The input values and the output value can be equal to the \
30+
/**Calculates output value from nine input values. The input values and the output value can be equal to the
3131
nodata value if not present or outside of the border. Must be implemented by subclasses*/
32-
float processNineCellWindow( float* x11, float* x21, float* x31, \
33-
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 );
32+
float processNineCellWindow( float* x11, float* x21, float* x31,
33+
float* x12, float* x22, float* x32,
34+
float* x13, float* x23, float* x33 );
3435

3536
float lightAzimuth() const { return mLightAzimuth; }
36-
void setLightAzimuth( float azimuth ){ mLightAzimuth = azimuth; }
37+
void setLightAzimuth( float azimuth ) { mLightAzimuth = azimuth; }
3738
float lightAngle() const { return mLightAngle; }
38-
void setLightAngle( float angle ){ mLightAngle = angle; }
39+
void setLightAngle( float angle ) { mLightAngle = angle; }
3940

4041
private:
4142
float mLightAzimuth;

‎src/analysis/raster/qgsrelief.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
qgsrelief.cpp - description
33
---------------------------
44
begin : November 2011
5-
copyright : (C) 20011 by Marco Hugentobler
5+
copyright : (C) 2011 by Marco Hugentobler
66
email : marco dot hugentobler at sourcepole dot ch
77
***************************************************************************/
88

‎src/analysis/raster/qgsrelief.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
qgsrelief.h - description
33
---------------------------
44
begin : November 2011
5-
copyright : (C) 20011 by Marco Hugentobler
5+
copyright : (C) 2011 by Marco Hugentobler
66
email : marco dot hugentobler at sourcepole dot ch
77
***************************************************************************/
88

‎src/app/qgsmaptoolcapture.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ QgsMapToolCapture::~QgsMapToolCapture()
5555

5656
stopCapturing();
5757

58-
if( mValidator )
58+
if ( mValidator )
5959
{
6060
mValidator->deleteLater();
6161
mValidator = 0;
@@ -283,7 +283,7 @@ void QgsMapToolCapture::validateGeometry()
283283
if ( settings.value( "/qgis/digitizing/validate_geometries", 1 ).toInt() == 0 )
284284
return;
285285

286-
if( mValidator )
286+
if ( mValidator )
287287
{
288288
mValidator->deleteLater();
289289
mValidator = 0;
@@ -311,7 +311,7 @@ void QgsMapToolCapture::validateGeometry()
311311
case CapturePolygon:
312312
if ( mCaptureList.size() < 3 )
313313
return;
314-
g = QgsGeometry::fromPolygon( QgsPolygon() << ( QgsPolyline () << mCaptureList.toVector() << mCaptureList[0] ) );
314+
g = QgsGeometry::fromPolygon( QgsPolygon() << ( QgsPolyline() << mCaptureList.toVector() << mCaptureList[0] ) );
315315
break;
316316
}
317317

‎src/core/qgsattributeaction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ QString QgsAttributeAction::expandAction( QString action, QgsFeature &feat, cons
202202
int start = index;
203203
index = pos + rx.matchedLength();
204204

205-
QString to_replace = rx.cap(1).trimmed();
205+
QString to_replace = rx.cap( 1 ).trimmed();
206206
QgsDebugMsg( "Found expression:" + to_replace );
207207

208208
if ( substitutionMap && substitutionMap->contains( to_replace ) )

‎src/core/qgsattributeaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class CORE_EXPORT QgsAttributeAction
188188
static void ( *smPythonExecute )( const QString & );
189189

190190
void runAction( const QgsAction &action,
191-
void ( *executePython )( const QString & ) = 0 );
191+
void ( *executePython )( const QString & ) = 0 );
192192

193193
int mDefaultAction;
194194
};

‎src/core/qgsexpression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static double getDoubleValue( const QVariant& value, QgsExpression* parent )
138138
static int getIntValue( const QVariant& value, QgsExpression* parent )
139139
{
140140
bool ok;
141-
qint64 x = value.toLongLong(&ok);
141+
qint64 x = value.toLongLong( &ok );
142142
if ( ok && x >= std::numeric_limits<int>::min() && x <= std::numeric_limits<int>::max() )
143143
{
144144
return x;

‎src/core/qgsvectorlayerimport.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ typedef QgsVectorLayerImport::ImportError createEmptyLayer_t(
4040

4141

4242
QgsVectorLayerImport::QgsVectorLayerImport( const QString &uri,
43-
const QString &providerKey,
44-
const QgsFieldMap& fields,
45-
QGis::WkbType geometryType,
46-
const QgsCoordinateReferenceSystem* crs,
47-
bool overwrite,
48-
const QMap<QString, QVariant> *options )
43+
const QString &providerKey,
44+
const QgsFieldMap& fields,
45+
QGis::WkbType geometryType,
46+
const QgsCoordinateReferenceSystem* crs,
47+
bool overwrite,
48+
const QMap<QString, QVariant> *options )
4949
: mErrorCount( 0 )
5050
{
5151
mProvider = NULL;

‎src/gui/qgsexpressionbuilderwidget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
4343
expressionTree->setContextMenuPolicy( Qt::CustomContextMenu );
4444
connect( expressionTree, SIGNAL( customContextMenuRequested( const QPoint & ) ), this, SLOT( showContextMenu( const QPoint & ) ) );
4545

46-
foreach (QPushButton* button, this->mOperatorsGroupBox->findChildren<QPushButton *>())
46+
foreach( QPushButton* button, this->mOperatorsGroupBox->findChildren<QPushButton *>() )
4747
{
48-
connect( button, SIGNAL( pressed() ), this, SLOT( operatorButtonClicked() ) );
48+
connect( button, SIGNAL( pressed() ), this, SLOT( operatorButtonClicked() ) );
4949
}
5050

5151
// TODO Can we move this stuff to QgsExpression, like the functions?
@@ -155,7 +155,7 @@ void QgsExpressionBuilderWidget::loadFieldNames()
155155
void QgsExpressionBuilderWidget::loadFieldNames( QgsFieldMap fields )
156156
{
157157
if ( fields.isEmpty() )
158-
return;
158+
return;
159159

160160
QStringList fieldNames;
161161
foreach( QgsField field, fields )

‎src/gui/qgsprojectionselector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,10 +857,10 @@ void QgsProjectionSelector::on_cbxHideDeprecated_stateChanged()
857857
hideDeprecated( lstCoordinateSystems->topLevelItem( i ) );
858858
}
859859

860-
void QgsProjectionSelector::on_lstRecent_itemClicked(QTreeWidgetItem * item)
860+
void QgsProjectionSelector::on_lstRecent_itemClicked( QTreeWidgetItem * item )
861861
{
862862
setSelectedCrsId( item->text( QGIS_CRS_ID_COLUMN ).toLong() );
863-
item->setSelected(true);
863+
item->setSelected( true );
864864
}
865865

866866
void QgsProjectionSelector::on_leSearch_textChanged( const QString & theFilterTxt )

‎src/gui/qgsprojectionselector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class GUI_EXPORT QgsProjectionSelector: public QWidget, private Ui::QgsProjectio
113113
* \warning This function's behaviour is undefined if it is called after the widget is shown.
114114
*/
115115
void setOgcWmsCrsFilter( QSet<QString> crsFilter );
116-
void on_lstRecent_itemClicked(QTreeWidgetItem * );
116+
void on_lstRecent_itemClicked( QTreeWidgetItem * );
117117
void on_cbxHideDeprecated_stateChanged();
118118
void on_leSearch_textChanged( const QString & );
119119

‎src/gui/qgsscalecombobox.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void QgsScaleComboBox::showPopup()
5757
parts = itemText( i ).split( ':' );
5858
nextScale = parts.at( 1 ).toLong( &ok );
5959
delta = qAbs( currScale - nextScale );
60-
if( delta < min )
60+
if ( delta < min )
6161
{
6262
min = delta;
6363
idx = i;

‎src/plugins/gps_importer/qgsgpsplugingui.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,15 @@ void QgsGPSPluginGui::on_buttonBox_accepted()
8989
// what should we do?
9090
switch ( tabWidget->currentIndex() )
9191
{
92-
// add a GPX layer?
9392
case 0:
93+
// add a GPX layer?
9494
emit loadGPXFile( leGPXFile->text(), cbGPXWaypoints->isChecked(),
9595
cbGPXRoutes->isChecked(), cbGPXTracks->isChecked() );
9696
break;
97-
// or import other file?
97+
9898
case 1:
9999
{
100+
// or import other file?
100101
const QString& typeString( cmbIMPFeature->currentText() );
101102
emit importGPSFile( leIMPInput->text(),
102103
mImporters.find( mImpFormat )->second,
@@ -107,9 +108,10 @@ void QgsGPSPluginGui::on_buttonBox_accepted()
107108
leIMPLayer->text() );
108109
break;
109110
}
110-
// or download GPS data from a device?
111+
111112
case 2:
112113
{
114+
// or download GPS data from a device?
113115
int featureType = cmbDLFeatureType->currentIndex();
114116

115117
QString fileName = leDLOutput->text();
@@ -124,17 +126,19 @@ void QgsGPSPluginGui::on_buttonBox_accepted()
124126
fileName, leDLBasename->text() );
125127
break;
126128
}
127-
// or upload GPS data to a device?
129+
128130
case 3:
129131
{
132+
// or upload GPS data to a device?
130133
emit uploadToGPS( mGPXLayers[cmbULLayer->currentIndex()],
131134
cmbULDevice->currentText(),
132135
cmbULPort->itemData( cmbULPort->currentIndex() ).toString() );
133136
break;
134137
}
135-
// or convert between waypoints/tracks=
138+
136139
case 4:
137140
{
141+
// or convert between waypoints/tracks=
138142
int convertType = cmbCONVType->itemData( cmbCONVType->currentIndex() ).toInt();
139143

140144
emit convertGPSFile( leCONVInput->text(),

0 commit comments

Comments
 (0)
Please sign in to comment.