diff --git a/python/plugins/processing/algs/gdal/ogr2ogrclip.py b/python/plugins/processing/algs/gdal/ogr2ogrclip.py
index 22c02ab2a6a..5e18f1079be 100644
--- a/python/plugins/processing/algs/gdal/ogr2ogrclip.py
+++ b/python/plugins/processing/algs/gdal/ogr2ogrclip.py
@@ -75,7 +75,7 @@ class Ogr2OgrClip(OgrAlgorithm):
arguments.append(output)
arguments.append(ogrLayer)
arguments.append(self.ogrLayerName(inLayer))
-
+
commands = []
if isWindows():
commands = ['cmd.exe', '/C ', 'ogr2ogr.exe',
diff --git a/python/plugins/processing/algs/gdal/rasterize.py b/python/plugins/processing/algs/gdal/rasterize.py
index de022ea5599..95fc7265ca4 100644
--- a/python/plugins/processing/algs/gdal/rasterize.py
+++ b/python/plugins/processing/algs/gdal/rasterize.py
@@ -118,7 +118,7 @@ class rasterize(OgrAlgorithm):
bigtiff = self.BIGTIFFTYPE[self.getParameterValue(self.BIGTIFF)]
tfw = str(self.getParameterValue(self.TFW))
out = self.getOutputValue(self.OUTPUT)
-
+
arguments = []
arguments.append('-a')
arguments.append(str(self.getParameterValue(self.FIELD)))
diff --git a/python/plugins/processing/algs/gdal/translate.py b/python/plugins/processing/algs/gdal/translate.py
index bf5b2afaed2..c2dc66475b4 100644
--- a/python/plugins/processing/algs/gdal/translate.py
+++ b/python/plugins/processing/algs/gdal/translate.py
@@ -128,7 +128,7 @@ class translate(GdalAlgorithm):
compress = self.COMPRESSTYPE[self.getParameterValue(self.COMPRESS)]
bigtiff = self.BIGTIFFTYPE[self.getParameterValue(self.BIGTIFF)]
tfw = str(self.getParameterValue(self.TFW))
-
+
arguments = []
arguments.append('-of')
arguments.append(GdalUtils.getFormatShortNameFromFilename(out))
diff --git a/python/plugins/processing/algs/gdal/warp.py b/python/plugins/processing/algs/gdal/warp.py
index a3fb80e1754..b016459c42b 100644
--- a/python/plugins/processing/algs/gdal/warp.py
+++ b/python/plugins/processing/algs/gdal/warp.py
@@ -113,7 +113,7 @@ class warp(GdalAlgorithm):
arguments = []
arguments.append('-ot')
arguments.append(self.TYPE[self.getParameterValue(self.RTYPE)])
- if len(srccrs) > 0:
+ if len(srccrs) > 0:
arguments.append('-s_srs')
arguments.append(srccrs)
if len(dstcrs) > 0:
diff --git a/scripts/astyle.sh b/scripts/astyle.sh
index 89444cda57f..8128098c8e3 100755
--- a/scripts/astyle.sh
+++ b/scripts/astyle.sh
@@ -73,6 +73,10 @@ for f in "$@"; do
cmd=:
;;
+ python/ext-libs/*)
+ cmd=:
+ ;;
+
*.py|*.sip)
cmd="perl -i.prepare -pe 's/[\r\t ]+$//;'"
;;
diff --git a/src/analysis/network/qgsgraphdirector.h b/src/analysis/network/qgsgraphdirector.h
index 93274ad94bb..b9afaac814a 100644
--- a/src/analysis/network/qgsgraphdirector.h
+++ b/src/analysis/network/qgsgraphdirector.h
@@ -42,7 +42,7 @@ class ANALYSIS_EXPORT QgsGraphDirector : public QObject
public:
//! Destructor
- virtual ~QgsGraphDirector() { };
+ virtual ~QgsGraphDirector() { }
/**
* Make a graph using RgGraphBuilder
diff --git a/src/app/pluginmanager/qgspluginmanager.cpp b/src/app/pluginmanager/qgspluginmanager.cpp
index bee4f4ebba6..6c0a9602ad6 100644
--- a/src/app/pluginmanager/qgspluginmanager.cpp
+++ b/src/app/pluginmanager/qgspluginmanager.cpp
@@ -700,19 +700,19 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
html += QString( "
" ).arg( tr( "There is a new version available" ) );
- };
+ }
if ( metadata->value( "status" ) == "new" )
{
html += QString( "" ).arg( tr( "This is a new plugin" ) );
- };
+ }
if ( metadata->value( "status" ) == "newer" )
{
html += QString( "" ).arg( tr( "Installed version of this plugin is higher than any version found in repository" ) );
- };
+ }
if ( metadata->value( "experimental" ) == "true" )
{
html += QString( ""
@@ -720,7 +720,7 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
"
%1"
" "
"
" ).arg( tr( "This plugin is experimental" ) );
- };
+ }
if ( metadata->value( "deprecated" ) == "true" )
{
html += QString( ""
@@ -728,7 +728,7 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
"
%1"
" "
"
" ).arg( tr( "This plugin is deprecated" ) );
- };
+ }
// Now the metadata
diff --git a/src/app/qgsdecorationscalebar.cpp b/src/app/qgsdecorationscalebar.cpp
index 14eba518416..b5d14c80154 100644
--- a/src/app/qgsdecorationscalebar.cpp
+++ b/src/app/qgsdecorationscalebar.cpp
@@ -151,13 +151,13 @@ void QgsDecorationScaleBar::render( QPainter * theQPainter )
{
myScaleBarWidth = myCanvasWidth / 4.0; // pixels
myActualSize = myScaleBarWidth * myMapUnitsPerPixelDouble; // map units
- };
+ }
//if scale bar is more than half the canvas wide keep halving until not
while ( myScaleBarWidth > myCanvasWidth / 3.0 )
{
myScaleBarWidth = myScaleBarWidth / 3;
- };
+ }
myActualSize = myScaleBarWidth * myMapUnitsPerPixelDouble;
// Work out the exponent for the number - e.g, 1234 will give 3,
@@ -235,7 +235,7 @@ void QgsDecorationScaleBar::render( QPainter * theQPainter )
myScaleBarUnitLabel = tr( " unknown" );
default:
QgsDebugMsg( QString( "Error: not picked up map units - actual value = %1" ).arg( myMapUnits ) );
- };
+ }
//Set font and calculate width of unit label
int myFontSize = 10; //we use this later for buffering
diff --git a/src/core/qgslayerdefinition.cpp b/src/core/qgslayerdefinition.cpp
index d30bec34a1d..81fd99053ff 100644
--- a/src/core/qgslayerdefinition.cpp
+++ b/src/core/qgslayerdefinition.cpp
@@ -35,6 +35,8 @@ bool QgsLayerDefinition::loadLayerDefinition( const QString &path, QgsLayerTreeG
bool QgsLayerDefinition::loadLayerDefinition( QDomDocument doc, QgsLayerTreeGroup *rootGroup, QString &errorMessage )
{
+ Q_UNUSED( errorMessage );
+
QgsLayerTreeGroup* root = new QgsLayerTreeGroup;
// We have to replace the IDs before we load them because it's too late once they are loaded
QDomNodeList ids = doc.elementsByTagName( "id" );
diff --git a/src/core/raster/qgsrasterdataprovider.h b/src/core/raster/qgsrasterdataprovider.h
index b9f2365450d..a2ef5e5bfae 100644
--- a/src/core/raster/qgsrasterdataprovider.h
+++ b/src/core/raster/qgsrasterdataprovider.h
@@ -272,7 +272,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
Q_UNUSED( thePyramidList ); Q_UNUSED( theResamplingMethod );
Q_UNUSED( theFormat ); Q_UNUSED( theConfigOptions );
return "FAILED_NOT_SUPPORTED";
- };
+ }
/** \brief Accessor for ths raster layers pyramid list.
* @param overviewList used to construct the pyramid list (optional), when empty the list is defined by the provider.
@@ -282,7 +282,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
* list.
*/
virtual QList buildPyramidList( QList overviewList = QList() )
- { Q_UNUSED( overviewList ); return QList(); };
+ { Q_UNUSED( overviewList ); return QList(); }
/** \brief Returns true if raster has at least one populated histogram. */
bool hasPyramids();
diff --git a/src/gui/editorwidgets/qgsrelationreferencewidget.cpp b/src/gui/editorwidgets/qgsrelationreferencewidget.cpp
index 5f8accd6fb4..3b953624f0a 100644
--- a/src/gui/editorwidgets/qgsrelationreferencewidget.cpp
+++ b/src/gui/editorwidgets/qgsrelationreferencewidget.cpp
@@ -438,7 +438,7 @@ void QgsRelationReferenceWidget::init()
qSort( cache.begin(), cache.end(), orderByLessThan );
- Q_FOREACH( const ValueRelationItem& item, cache )
+ Q_FOREACH ( const ValueRelationItem& item, cache )
{
mComboBox->addItem( item.first.toString(), item.second );
diff --git a/src/gui/qgisgui.cpp b/src/gui/qgisgui.cpp
index be8a52e82ed..8c72a764385 100644
--- a/src/gui/qgisgui.cpp
+++ b/src/gui/qgisgui.cpp
@@ -177,7 +177,7 @@ namespace QgisGui
QString createFileFilter_( QString const &longName, QString const &glob )
{
- return QString("%1 (%2 %3)").arg( longName ).arg( glob.toLower() ).arg( glob.toUpper() );
+ return QString( "%1 (%2 %3)" ).arg( longName ).arg( glob.toLower() ).arg( glob.toUpper() );
}
QString createFileFilter_( QString const &format )
diff --git a/src/plugins/coordinate_capture/coordinatecapture.cpp b/src/plugins/coordinate_capture/coordinatecapture.cpp
index ce9c99c8121..7fde65c870b 100644
--- a/src/plugins/coordinate_capture/coordinatecapture.cpp
+++ b/src/plugins/coordinate_capture/coordinatecapture.cpp
@@ -74,8 +74,8 @@ CoordinateCapture::CoordinateCapture( QgisInterface * theQgisInterface )
, mypUserCrsToolButton( NULL )
, mypCRSLabel( NULL )
, mCanvasDisplayPrecision( 5 )
- , mQGisIface( theQgisInterface )
, mUserCrsDisplayPrecision( 5 )
+ , mQGisIface( theQgisInterface )
, mQActionPointer( NULL )
{
}
diff --git a/src/plugins/globe/globe_plugin.cpp b/src/plugins/globe/globe_plugin.cpp
index 33aa4595e22..6a1ebd31c81 100644
--- a/src/plugins/globe/globe_plugin.cpp
+++ b/src/plugins/globe/globe_plugin.cpp
@@ -122,17 +122,17 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface )
, mQActionUnload( 0 )
, mOsgViewer( 0 )
, mViewerWidget( 0 )
+ , mRootNode( 0 )
, mMapNode( 0 )
, mBaseLayer( 0 )
, mQgisMapLayer( 0 )
, mTileSource( 0 )
+ , mControlCanvas( 0 )
, mElevationManager( 0 )
, mObjectPlacer( 0 )
- , mControlCanvas( 0 )
, mSelectedLat( 0. )
, mSelectedLon( 0. )
, mSelectedElevation( 0. )
- , mRootNode( 0 )
{
mIsGlobeRunning = false;
//needed to be "seen" by other plugins by doing
diff --git a/src/plugins/grass/qgsgrassmodule.cpp b/src/plugins/grass/qgsgrassmodule.cpp
index 9dcc0a3cebc..6ddc25be4a9 100644
--- a/src/plugins/grass/qgsgrassmodule.cpp
+++ b/src/plugins/grass/qgsgrassmodule.cpp
@@ -286,9 +286,9 @@ QgsGrassModuleOptions::QgsGrassModuleOptions(
: mIface( iface )
, mTools( tools )
, mModule( module )
- , mDirect( direct )
, mParent( 0 )
, mRegionModeComboBox( 0 )
+ , mDirect( direct )
{
QgsDebugMsg( "called." );
diff --git a/src/plugins/grass/qgsgrassutils.cpp b/src/plugins/grass/qgsgrassutils.cpp
index 45469f009c2..ef7c0bf38c4 100644
--- a/src/plugins/grass/qgsgrassutils.cpp
+++ b/src/plugins/grass/qgsgrassutils.cpp
@@ -67,13 +67,13 @@ bool QgsGrassUtils::itemExists( QString element, QString item )
QgsGrassElementDialog::QgsGrassElementDialog( QWidget *parent )
: QObject()
- , mParent( parent )
, mDialog( 0 )
, mLineEdit( 0 )
, mLabel( 0 )
, mErrorLabel( 0 )
, mOkButton( 0 )
, mCancelButton( 0 )
+ , mParent( parent )
{
}
diff --git a/src/plugins/heatmap/heatmap.cpp b/src/plugins/heatmap/heatmap.cpp
index 53f8800e683..77447f56424 100644
--- a/src/plugins/heatmap/heatmap.cpp
+++ b/src/plugins/heatmap/heatmap.cpp
@@ -68,8 +68,8 @@ static const QString sPluginIcon = ":/heatmap/heatmap.png";
*/
Heatmap::Heatmap( QgisInterface * theQgisInterface )
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
- , mQGisIface( theQgisInterface )
, mDecay( 1. )
+ , mQGisIface( theQgisInterface )
, mQActionPointer( 0 )
{
}
diff --git a/tests/src/gui/testqgsgui.cpp b/tests/src/gui/testqgsgui.cpp
index ca86afe232d..1fafad3d7c3 100644
--- a/tests/src/gui/testqgsgui.cpp
+++ b/tests/src/gui/testqgsgui.cpp
@@ -28,7 +28,7 @@ class TestQgsGui : public QObject
void TestQgsGui::createFileFilterForFormat()
{
QString expected = "FOO format (*.foo *.FOO)";
- QString actual = QgisGui::createFileFilter_("foo");
+ QString actual = QgisGui::createFileFilter_( "foo" );
QCOMPARE( actual, expected );
}
@@ -36,7 +36,7 @@ void TestQgsGui::createFileFilterForFormat()
void TestQgsGui::createFileFilter()
{
QString expected = "My Description (my_regex MY_REGEX)";
- QString actual = QgisGui::createFileFilter_("My Description", "my_regex");
+ QString actual = QgisGui::createFileFilter_( "My Description", "my_regex" );
QCOMPARE( actual, expected );
}
diff --git a/tests/src/gui/testqgsmapcanvas.cpp b/tests/src/gui/testqgsmapcanvas.cpp
index 9784e205915..3bec63b0380 100644
--- a/tests/src/gui/testqgsmapcanvas.cpp
+++ b/tests/src/gui/testqgsmapcanvas.cpp
@@ -8,9 +8,10 @@
namespace QTest
{
template<>
- char* toString( const QgsRectangle& r ) {
+ char* toString( const QgsRectangle& r )
+ {
QByteArray ba = r.toString().toLocal8Bit();
- return qstrdup(ba.data());
+ return qstrdup( ba.data() );
}
}