Skip to content

Commit 5e9d95b

Browse files
committed
indentation update
1 parent 4342e9b commit 5e9d95b

39 files changed

+247
-248
lines changed

scripts/astyle-all.sh

+1-1
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/core/spatialite/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
11+
src/app/gps/qwtpolar-*|src/core/spatialite/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
1212
echo $f skipped
1313
continue
1414
;;

src/app/qgisapp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2287,7 +2287,7 @@ void QgisApp::addDatabaseLayers( QStringList const & layerPathList, QString cons
22872287

22882288
mMapCanvas->freeze( true );
22892289

2290-
QApplication::setOverrideCursor(Qt::WaitCursor);
2290+
QApplication::setOverrideCursor( Qt::WaitCursor );
22912291

22922292
foreach( QString layerPath, layerPathList )
22932293
{

src/app/qgisapp.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
466466
//! Add a databaselayer to the map
467467
void addDatabaseLayer();
468468
//#endif
469-
//! Add a list of database layers to the map
469+
//! Add a list of database layers to the map
470470
void addDatabaseLayers( QStringList const & layerPathList, QString const & providerKey );
471471
//#ifdef HAVE_SPATIALITE
472472
//! Add a SpatiaLite layer to the map

src/app/qgsconfigureshortcutsdialog.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,26 @@ QgsConfigureShortcutsDialog::QgsConfigureShortcutsDialog( QWidget* parent )
4949

5050
QgsConfigureShortcutsDialog::~QgsConfigureShortcutsDialog()
5151
{
52-
saveState();
52+
saveState();
5353
}
5454

5555
/*!
5656
* Function to save dialog window state
5757
*/
5858
void QgsConfigureShortcutsDialog::saveState()
5959
{
60-
QSettings settings;
61-
settings.setValue( "/Windows/ShortcutsDialog/geometry", saveGeometry() );
60+
QSettings settings;
61+
settings.setValue( "/Windows/ShortcutsDialog/geometry", saveGeometry() );
6262
}
6363

6464
/*!
6565
* Function to restore dialog window state
6666
*/
6767
void QgsConfigureShortcutsDialog::restoreState()
6868
{
69-
QSettings settings;
70-
restoreGeometry( settings.value( "/Windows/ShortcutsDialog/geometry" ).toByteArray() );
71-
}
69+
QSettings settings;
70+
restoreGeometry( settings.value( "/Windows/ShortcutsDialog/geometry" ).toByteArray() );
71+
}
7272

7373
void QgsConfigureShortcutsDialog::populateActions()
7474
{

src/app/qgsconfigureshortcutsdialog.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class QgsConfigureShortcutsDialog : public QDialog, private Ui::QgsConfigureShor
2727
public:
2828
QgsConfigureShortcutsDialog( QWidget* parent = NULL );
2929
~QgsConfigureShortcutsDialog();
30-
30+
3131
void populateActions();
3232

3333
protected:
@@ -58,7 +58,7 @@ class QgsConfigureShortcutsDialog : public QDialog, private Ui::QgsConfigureShor
5858
* Function to save dialog window state
5959
*/
6060
void saveState();
61-
61+
6262
/*!
6363
* Function to restore dialog window state
6464
*/

src/app/qgsdecorationcopyright.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ email : tim@linfiniti.com
4242

4343

4444
QgsDecorationCopyright::QgsDecorationCopyright( QObject* parent )
45-
: QObject(parent)
45+
: QObject( parent )
4646
{
4747
mPlacementLabels << tr( "Bottom Left" ) << tr( "Top Left" )
4848
<< tr( "Top Right" ) << tr( "Bottom Right" );
@@ -77,7 +77,7 @@ void QgsDecorationCopyright::run()
7777
{
7878
QgsDecorationCopyrightDialog dlg( *this, QgisApp::instance() );
7979

80-
if (dlg.exec())
80+
if ( dlg.exec() )
8181
{
8282
saveToProject();
8383
QgisApp::instance()->mapCanvas()->refresh();

src/app/qgsdecorationcopyright.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class QgsDecorationCopyrightDialog;
2929

3030
class QgsDecorationCopyright : public QObject
3131
{
32-
Q_OBJECT
33-
public:
32+
Q_OBJECT
33+
public:
3434

3535
//! Constructor
3636
QgsDecorationCopyright( QObject* parent = NULL );

src/app/qgsmaptoolidentify.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ bool QgsMapToolIdentify::identifyVectorLayer( QgsVectorLayer *layer, int x, int
245245
QgsDistanceArea calc;
246246
if ( !featureList.count() == 0 )
247247
{
248-
calc.setProjectionsEnabled( mCanvas->hasCrsTransformEnabled() ); // project?
249-
calc.setEllipsoid( ellipsoid );
250-
calc.setSourceCrs( layer->crs().srsid() );
248+
calc.setProjectionsEnabled( mCanvas->hasCrsTransformEnabled() ); // project?
249+
calc.setEllipsoid( ellipsoid );
250+
calc.setSourceCrs( layer->crs().srsid() );
251251
}
252252
QgsFeatureList::iterator f_it = featureList.begin();
253253

src/app/qgsoptions.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ void QgsOptions::loadGdalDriverList()
10401040
myGdalDriverDescription = GDALGetDescription( myGdalDriver );
10411041
myDrivers << myGdalDriverDescription;
10421042
}
1043-
// add the skipped drivers to the list too in case their drivers are
1043+
// add the skipped drivers to the list too in case their drivers are
10441044
// already unloaded...may result in false positive if underlying
10451045
// sys config has changed and that driver no longer exists...
10461046
myDrivers.append( mySkippedDrivers );
@@ -1049,7 +1049,7 @@ void QgsOptions::loadGdalDriverList()
10491049

10501050
QStringListIterator myIterator( myDrivers );
10511051

1052-
while (myIterator.hasNext())
1052+
while ( myIterator.hasNext() )
10531053
{
10541054
QString myName = myIterator.next();
10551055
QListWidgetItem * mypItem = new QListWidgetItem( myName );
@@ -1067,7 +1067,7 @@ void QgsOptions::loadGdalDriverList()
10671067

10681068
void QgsOptions::saveGdalDriverList()
10691069
{
1070-
for ( int i=0; i < lstGdalDrivers->count(); i++ )
1070+
for ( int i = 0; i < lstGdalDrivers->count(); i++ )
10711071
{
10721072
QListWidgetItem * mypItem = lstGdalDrivers->item( i );
10731073
if ( mypItem->checkState() == Qt::Unchecked )
@@ -1080,5 +1080,5 @@ void QgsOptions::saveGdalDriverList()
10801080
}
10811081
}
10821082
QSettings mySettings;
1083-
mySettings.setValue( "gdal/skipList", QgsApplication::skippedGdalDrivers().join(" ") );
1083+
mySettings.setValue( "gdal/skipList", QgsApplication::skippedGdalDrivers().join( " " ) );
10841084
}

src/app/qgsoptions.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class QgsOptions : public QDialog, private Ui::QgsOptionsBase
129129
* @note added in 2.0
130130
*/
131131
void saveGdalDriverList();
132-
132+
133133
protected:
134134
//! Populates combo box with ellipsoids
135135
void getEllipsoidList();

src/core/qgsapplication.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ void QgsApplication::init( QString customConfigPath )
129129
{
130130
myDir.mkpath( myPamPath ); //fail silently
131131
}
132-
133-
132+
133+
134134
#if defined(Q_WS_WIN32) || defined(WIN32)
135-
CPLSetConfigOption("GDAL_PAM_PROXY_DIR", myPamPath.toUtf8());
135+
CPLSetConfigOption( "GDAL_PAM_PROXY_DIR", myPamPath.toUtf8() );
136136
#else
137-
//under other OS's we use an environment var so the user can
137+
//under other OS's we use an environment var so the user can
138138
//override the path if he likes
139139
int myChangeFlag = 0; //whether we want to force the env var to change
140140
setenv( "GDAL_PAM_PROXY_DIR", myPamPath.toUtf8(), myChangeFlag );
@@ -741,9 +741,9 @@ void QgsApplication::restoreGdalDriver( QString theDriver )
741741
void QgsApplication::applyGdalSkippedDrivers()
742742
{
743743
mGdalSkipList.removeDuplicates();
744-
QString myDriverList = mGdalSkipList.join(" ");
744+
QString myDriverList = mGdalSkipList.join( " " );
745745
QgsDebugMsg( "Gdal Skipped driver list set to:" );
746746
QgsDebugMsg( myDriverList );
747-
CPLSetConfigOption("GDAL_SKIP", myDriverList.toUtf8());
747+
CPLSetConfigOption( "GDAL_SKIP", myDriverList.toUtf8() );
748748
GetGDALDriverManager()->AutoSkipDrivers();
749749
}

src/core/qgsapplication.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -224,25 +224,25 @@ class CORE_EXPORT QgsApplication: public QApplication
224224
@note added in 2.0 */
225225
static QString buildOutputPath() { return mBuildOutputPath; }
226226

227-
/** Sets the GDAL_SKIP environment variable to include the specified driver
227+
/** Sets the GDAL_SKIP environment variable to include the specified driver
228228
* and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. The
229229
* driver name should be the short format of the Gdal driver name e.g. GTIFF.
230230
* @note added in 2.0
231231
*/
232232
static void skipGdalDriver( QString theDriver );
233233

234-
/** Sets the GDAL_SKIP environment variable to exclude the specified driver
234+
/** Sets the GDAL_SKIP environment variable to exclude the specified driver
235235
* and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. The
236236
* driver name should be the short format of the Gdal driver name e.g. GTIFF.
237237
* @note added in 2.0
238238
*/
239239
static void restoreGdalDriver( QString theDriver );
240240

241241
/** Returns the list of gdal drivers that should be skipped (based on
242-
* GDAL_SKIP environment variable)
242+
* GDAL_SKIP environment variable)
243243
* @note added in 2.0
244244
*/
245-
static QStringList skippedGdalDrivers( ){ return mGdalSkipList; };
245+
static QStringList skippedGdalDrivers( ) { return mGdalSkipList; };
246246

247247
/** Apply the skipped drivers list to gdal
248248
* @see skipGdalDriver
@@ -274,8 +274,8 @@ class CORE_EXPORT QgsApplication: public QApplication
274274
static QString mBuildSourcePath;
275275
/** path to the output directory of the build. valid only when running from build directory */
276276
static QString mBuildOutputPath;
277-
/** List of gdal drivers to be skipped. Uses GDAL_SKIP to exclude them.
278-
* @see skipGdalDriver, restoreGdalDriver
277+
/** List of gdal drivers to be skipped. Uses GDAL_SKIP to exclude them.
278+
* @see skipGdalDriver, restoreGdalDriver
279279
* @note added in 2.0 */
280280
static QStringList mGdalSkipList;
281281
};

src/core/qgsproviderregistry.cpp

100755100644
File mode changed.

src/core/qgsrasterdataprovider.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider
327327

328328
/** read block of data using give extent and size */
329329
virtual void readBlock( int bandNo, QgsRectangle const & viewExtent, int width, int height, QgsCoordinateReferenceSystem theSrcCRS, QgsCoordinateReferenceSystem theDestCRS, void *data );
330-
330+
331331
/* Read a value from a data block at a given index. */
332332
virtual double readValue( void *data, int type, int index );
333333

src/core/qgsvectorlayerimport.cpp

+23-23
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,25 @@
4141
#define FEATURE_BUFFER_SIZE 200
4242

4343
typedef QgsVectorLayerImport::ImportError createEmptyLayer_t(
44-
const QString &uri,
45-
const QgsFieldMap &fields,
46-
QGis::WkbType geometryType,
47-
const QgsCoordinateReferenceSystem *destCRS,
48-
bool overwrite,
49-
QMap<int, int> *oldToNewAttrIdx,
50-
QString *errorMessage,
51-
const QMap<QString, QVariant> *options
52-
);
44+
const QString &uri,
45+
const QgsFieldMap &fields,
46+
QGis::WkbType geometryType,
47+
const QgsCoordinateReferenceSystem *destCRS,
48+
bool overwrite,
49+
QMap<int, int> *oldToNewAttrIdx,
50+
QString *errorMessage,
51+
const QMap<QString, QVariant> *options
52+
);
5353

5454

5555
QgsVectorLayerImport::QgsVectorLayerImport(
56-
const QString &uri,
57-
const QString &providerKey,
58-
const QgsFieldMap& fields,
59-
QGis::WkbType geometryType,
60-
const QgsCoordinateReferenceSystem* crs,
61-
bool overwrite,
62-
const QMap<QString, QVariant> *options )
56+
const QString &uri,
57+
const QString &providerKey,
58+
const QgsFieldMap& fields,
59+
QGis::WkbType geometryType,
60+
const QgsCoordinateReferenceSystem* crs,
61+
bool overwrite,
62+
const QMap<QString, QVariant> *options )
6363
{
6464
mProvider = NULL;
6565
QgsProviderRegistry * pReg = QgsProviderRegistry::instance();
@@ -181,13 +181,13 @@ bool QgsVectorLayerImport::flushBuffer()
181181

182182
QgsVectorLayerImport::ImportError
183183
QgsVectorLayerImport::importLayer( QgsVectorLayer* layer,
184-
const QString& uri,
185-
const QString& providerKey,
186-
const QgsCoordinateReferenceSystem *destCRS,
187-
bool onlySelected,
188-
QString *errorMessage,
189-
bool skipAttributeCreation,
190-
QMap<QString, QVariant> *options )
184+
const QString& uri,
185+
const QString& providerKey,
186+
const QgsCoordinateReferenceSystem *destCRS,
187+
bool onlySelected,
188+
QString *errorMessage,
189+
bool skipAttributeCreation,
190+
QMap<QString, QVariant> *options )
191191
{
192192
const QgsCoordinateReferenceSystem* outputCRS;
193193
QgsCoordinateTransform* ct = 0;

src/core/raster/qgspseudocolorshader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ bool QgsPseudoColorShader::shade( double theValue, int* theReturnRedValue, int*
4444
}
4545

4646
//check if we are in the first class break
47-
if ( ( myPixelValue >= mClassBreakMin1 ) && ( myPixelValue < mClassBreakMax1 ) )
47+
if (( myPixelValue >= mClassBreakMin1 ) && ( myPixelValue < mClassBreakMax1 ) )
4848
{
4949
*theReturnRedValue = 0;
5050
*theReturnGreenValue = static_cast < int >((( 255 / mMinimumMaximumRange ) * ( myPixelValue - mClassBreakMin1 ) ) * 3 );

src/core/symbology-ng/qgsellipsesymbollayerv2.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ class CORE_EXPORT QgsEllipseSymbolLayerV2: public QgsMarkerSymbolLayerV2
2020
QgsSymbolLayerV2* clone() const;
2121
QgsStringMap properties() const;
2222

23-
void setSymbolName( const QString& name ){ mSymbolName = name; }
24-
QString symbolName() const{ return mSymbolName; }
23+
void setSymbolName( const QString& name ) { mSymbolName = name; }
24+
QString symbolName() const { return mSymbolName; }
2525

2626
void setSymbolNameField( int index, const QString& field );
2727
const QPair<int, QString>& symbolNameField() const { return mSymbolNameField; }
2828

29-
void setSymbolWidth( double w ){ mSymbolWidth = w; }
29+
void setSymbolWidth( double w ) { mSymbolWidth = w; }
3030
double symbolWidth() const { return mSymbolWidth; }
3131

3232
void setWidthField( int index, const QString& field );
3333
const QPair<int, QString>& widthField() const { return mWidthField; }
3434

35-
void setSymbolHeight( double h ){ mSymbolHeight = h; }
35+
void setSymbolHeight( double h ) { mSymbolHeight = h; }
3636
double symbolHeight() const { return mSymbolHeight; }
3737

3838
void setHeightField( int index, const QString& field );
@@ -41,19 +41,19 @@ class CORE_EXPORT QgsEllipseSymbolLayerV2: public QgsMarkerSymbolLayerV2
4141
void setRotationField( int index, const QString& field );
4242
const QPair<int, QString>& rotationField() const { return mRotationField; }
4343

44-
void setOutlineWidth( double w ){ mOutlineWidth = w; }
44+
void setOutlineWidth( double w ) { mOutlineWidth = w; }
4545
double outlineWidth() const { return mOutlineWidth; }
4646

4747
void setOutlineWidthField( int index, const QString& field );
4848
const QPair<int, QString>& outlineWidthField() const { return mOutlineWidthField; }
4949

50-
void setFillColor( const QColor& c ){ mFillColor = c;}
50+
void setFillColor( const QColor& c ) { mFillColor = c;}
5151
QColor fillColor() const { return mFillColor; }
5252

5353
void setFillColorField( int index, const QString& field );
5454
const QPair<int, QString>& fillColorField() const { return mFillColorField; }
5555

56-
void setOutlineColor( const QColor& c ){ mOutlineColor = c; }
56+
void setOutlineColor( const QColor& c ) { mOutlineColor = c; }
5757
QColor outlineColor() const { return mOutlineColor; }
5858

5959
void setOutlineColorField( int index, const QString& field );

src/core/symbology-ng/qgsrulebasedrendererv2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ QgsRuleBasedRendererV2::QgsRuleBasedRendererV2( QgsSymbolV2* defaultSymbol )
129129

130130
QgsSymbolV2* QgsRuleBasedRendererV2::symbolForFeature( QgsFeature& feature )
131131
{
132-
if( ! usingFirstRule() )
132+
if ( ! usingFirstRule() )
133133
return mCurrentSymbol;
134134

135135
for ( QList<Rule*>::iterator it = mCurrentRules.begin(); it != mCurrentRules.end(); ++it )

src/core/symbology-ng/qgsrulebasedrendererv2.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class CORE_EXPORT QgsRuleBasedRendererV2 : public QgsFeatureRendererV2
4646
public:
4747
//! Constructor takes ownership of the symbol
4848
Rule( QgsSymbolV2* symbol, int scaleMinDenom = 0, int scaleMaxDenom = 0, QString filterExp = QString(),
49-
QString label = QString(), QString description = QString() );
49+
QString label = QString(), QString description = QString() );
5050
Rule( const Rule& other );
5151
~Rule();
5252
QString dump() const;
@@ -133,7 +133,7 @@ class CORE_EXPORT QgsRuleBasedRendererV2 : public QgsFeatureRendererV2
133133
//! remove the rule at the specified index
134134
void removeRuleAt( int index );
135135
//! swap the two rules specified by the indices
136-
void swapRules( int index1, int index2);
136+
void swapRules( int index1, int index2 );
137137

138138
//////
139139

src/core/symbology-ng/qgssinglesymbolrendererv2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void QgsSingleSymbolRendererV2::stopRender( QgsRenderContext& context )
123123
QList<QString> QgsSingleSymbolRendererV2::usedAttributes()
124124
{
125125
QSet<QString> attributes;
126-
if( mSymbol )
126+
if ( mSymbol )
127127
{
128128
attributes.unite( mSymbol->usedAttributes() );
129129
}

0 commit comments

Comments
 (0)