Skip to content

Commit 198d8fe

Browse files
committed
fix warnings and extra semicolons
1 parent dc93261 commit 198d8fe

File tree

19 files changed

+34
-27
lines changed

19 files changed

+34
-27
lines changed

python/plugins/processing/algs/gdal/ogr2ogrclip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def processAlgorithm(self, progress):
7575
arguments.append(output)
7676
arguments.append(ogrLayer)
7777
arguments.append(self.ogrLayerName(inLayer))
78-
78+
7979
commands = []
8080
if isWindows():
8181
commands = ['cmd.exe', '/C ', 'ogr2ogr.exe',

python/plugins/processing/algs/gdal/rasterize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def processAlgorithm(self, progress):
118118
bigtiff = self.BIGTIFFTYPE[self.getParameterValue(self.BIGTIFF)]
119119
tfw = str(self.getParameterValue(self.TFW))
120120
out = self.getOutputValue(self.OUTPUT)
121-
121+
122122
arguments = []
123123
arguments.append('-a')
124124
arguments.append(str(self.getParameterValue(self.FIELD)))

python/plugins/processing/algs/gdal/translate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def processAlgorithm(self, progress):
128128
compress = self.COMPRESSTYPE[self.getParameterValue(self.COMPRESS)]
129129
bigtiff = self.BIGTIFFTYPE[self.getParameterValue(self.BIGTIFF)]
130130
tfw = str(self.getParameterValue(self.TFW))
131-
131+
132132
arguments = []
133133
arguments.append('-of')
134134
arguments.append(GdalUtils.getFormatShortNameFromFilename(out))

python/plugins/processing/algs/gdal/warp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def processAlgorithm(self, progress):
113113
arguments = []
114114
arguments.append('-ot')
115115
arguments.append(self.TYPE[self.getParameterValue(self.RTYPE)])
116-
if len(srccrs) > 0:
116+
if len(srccrs) > 0:
117117
arguments.append('-s_srs')
118118
arguments.append(srccrs)
119119
if len(dstcrs) > 0:

scripts/astyle.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ for f in "$@"; do
7373
cmd=:
7474
;;
7575

76+
python/ext-libs/*)
77+
cmd=:
78+
;;
79+
7680
*.py|*.sip)
7781
cmd="perl -i.prepare -pe 's/[\r\t ]+$//;'"
7882
;;

src/analysis/network/qgsgraphdirector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ANALYSIS_EXPORT QgsGraphDirector : public QObject
4242

4343
public:
4444
//! Destructor
45-
virtual ~QgsGraphDirector() { };
45+
virtual ~QgsGraphDirector() { }
4646

4747
/**
4848
* Make a graph using RgGraphBuilder

src/app/pluginmanager/qgspluginmanager.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -700,35 +700,35 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
700700
html += QString( "<table bgcolor=\"#FFFFAA\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"
701701
" <tr><td width=\"100%\" style=\"color:#880000\"><b>%1</b></td></tr>"
702702
"</table>" ).arg( tr( "There is a new version available" ) );
703-
};
703+
}
704704
if ( metadata->value( "status" ) == "new" )
705705
{
706706
html += QString( "<table bgcolor=\"#CCFFCC\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"
707707
" <tr><td width=\"100%\" style=\"color:#008800\"><b>%1</b></td></tr>"
708708
"</table>" ).arg( tr( "This is a new plugin" ) );
709-
};
709+
}
710710
if ( metadata->value( "status" ) == "newer" )
711711
{
712712
html += QString( "<table bgcolor=\"#FFFFCC\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"
713713
" <tr><td width=\"100%\" style=\"color:#550000\"><b>%1</b></td></tr>"
714714
"</table>" ).arg( tr( "Installed version of this plugin is higher than any version found in repository" ) );
715-
};
715+
}
716716
if ( metadata->value( "experimental" ) == "true" )
717717
{
718718
html += QString( "<table bgcolor=\"#EEEEBB\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">"
719719
" <tr><td width=\"100%\" style=\"color:#660000\">"
720720
" <img src=\"qrc:/images/themes/default/pluginExperimental.png\" width=\"32\"><b>%1</b>"
721721
" </td></tr>"
722722
"</table>" ).arg( tr( "This plugin is experimental" ) );
723-
};
723+
}
724724
if ( metadata->value( "deprecated" ) == "true" )
725725
{
726726
html += QString( "<table bgcolor=\"#EEBBCC\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">"
727727
" <tr><td width=\"100%\" style=\"color:#660000\">"
728728
" <img src=\"qrc:/images/themes/default/pluginDeprecated.png\" width=\"32\"><b>%1</b>"
729729
" </td></tr>"
730730
"</table>" ).arg( tr( "This plugin is deprecated" ) );
731-
};
731+
}
732732

733733
// Now the metadata
734734

src/app/qgsdecorationscalebar.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ void QgsDecorationScaleBar::render( QPainter * theQPainter )
151151
{
152152
myScaleBarWidth = myCanvasWidth / 4.0; // pixels
153153
myActualSize = myScaleBarWidth * myMapUnitsPerPixelDouble; // map units
154-
};
154+
}
155155

156156
//if scale bar is more than half the canvas wide keep halving until not
157157
while ( myScaleBarWidth > myCanvasWidth / 3.0 )
158158
{
159159
myScaleBarWidth = myScaleBarWidth / 3;
160-
};
160+
}
161161
myActualSize = myScaleBarWidth * myMapUnitsPerPixelDouble;
162162

163163
// Work out the exponent for the number - e.g, 1234 will give 3,
@@ -235,7 +235,7 @@ void QgsDecorationScaleBar::render( QPainter * theQPainter )
235235
myScaleBarUnitLabel = tr( " unknown" );
236236
default:
237237
QgsDebugMsg( QString( "Error: not picked up map units - actual value = %1" ).arg( myMapUnits ) );
238-
};
238+
}
239239

240240
//Set font and calculate width of unit label
241241
int myFontSize = 10; //we use this later for buffering

src/core/qgslayerdefinition.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ bool QgsLayerDefinition::loadLayerDefinition( const QString &path, QgsLayerTreeG
3535

3636
bool QgsLayerDefinition::loadLayerDefinition( QDomDocument doc, QgsLayerTreeGroup *rootGroup, QString &errorMessage )
3737
{
38+
Q_UNUSED( errorMessage );
39+
3840
QgsLayerTreeGroup* root = new QgsLayerTreeGroup;
3941
// We have to replace the IDs before we load them because it's too late once they are loaded
4042
QDomNodeList ids = doc.elementsByTagName( "id" );

src/core/raster/qgsrasterdataprovider.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
272272
Q_UNUSED( thePyramidList ); Q_UNUSED( theResamplingMethod );
273273
Q_UNUSED( theFormat ); Q_UNUSED( theConfigOptions );
274274
return "FAILED_NOT_SUPPORTED";
275-
};
275+
}
276276

277277
/** \brief Accessor for ths raster layers pyramid list.
278278
* @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
282282
* list.
283283
*/
284284
virtual QList<QgsRasterPyramid> buildPyramidList( QList<int> overviewList = QList<int>() )
285-
{ Q_UNUSED( overviewList ); return QList<QgsRasterPyramid>(); };
285+
{ Q_UNUSED( overviewList ); return QList<QgsRasterPyramid>(); }
286286

287287
/** \brief Returns true if raster has at least one populated histogram. */
288288
bool hasPyramids();

0 commit comments

Comments
 (0)