Skip to content

Commit 9bbc647

Browse files
committed
identation update and fix clang 3.3 warnings
1 parent 0710de3 commit 9bbc647

Some content is hidden

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

45 files changed

+99
-109
lines changed

python/plugins/GdalTools/tools/doOverview.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def getArguments( self ):
136136
# TODO fix batch enabled, argument order is wrong, levels not at end
137137
if self.isBatchEnabled():
138138
return arguments
139-
139+
140140
arguments.append(self.getInputFileName())
141141

142142
if len(self.mPyramidOptionsWidget.overviewList()) == 0:

python/plugins/GdalTools/tools/inOutSelector.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def setFilename(self, fn=None):
135135
elif isinstance(fn, str) or isinstance(fn, unicode):
136136
fn = unicode( fn )
137137

138-
#TODO test
138+
#TODO test
139139
elif isinstance(fn, list):
140140
if len( fn ) > 0:
141141
if self.getType() & self.MULTIFILE:

python/plugins/sextante/algs/ftools/ConvexHull.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def processAlgorithm(self, progress):
131131
outFeat.setAttributes([fid,val,area,perim])
132132
writer.addFeature(outFeat)
133133
except:
134-
raise GeoAlgorithmExecutionException("Exception while computing convex hull")
134+
raise GeoAlgorithmExecutionException("Exception while computing convex hull")
135135
fid += 1
136136
else:
137137
hull = []
@@ -155,4 +155,4 @@ def processAlgorithm(self, progress):
155155
raise GeoAlgorithmExecutionException("Exception while computing convex hull")
156156

157157
del writer
158-
158+

python/plugins/sextante/algs/ftools/ExportGeometryInfo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def processAlgorithm(self, progress):
9595
# 0 - layer CRS
9696
# 1 - project CRS
9797
# 2 - ellipsoidal
98-
if method == 2:
98+
if method == 2:
9999
ellips = QgsProject.instance().readEntry("Measure", "/Ellipsoid", GEO_NONE)[0]
100100
crs = layer.crs().srsid()
101101
elif method == 1:

python/plugins/sextante/algs/ftools/PointsInPolygonWeighted.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def processAlgorithm(self, progress):
105105
tmpGeom = QgsGeometry(ftPoint.geometry())
106106
if geom.contains(tmpGeom):
107107
weight = str(ftPoint.attributes()[fieldIdx])
108-
try:
108+
try:
109109
count += float(weight)
110110
except:
111111
pass #ignore fields with non-numeric values

python/plugins/sextante/core/SextanteTableWriter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(self, fileName, encoding, fields):
4444
file.write("\n")
4545
file.close()
4646

47-
def addRecord(self, values):
47+
def addRecord(self, values):
4848
file = open(self.fileName, "a")
4949
file.write(";".join([unicode(value) for value in values]))
5050
file.write("\n")

python/plugins/sextante/gui/AlgorithmExecutionDialog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def resetGUI(self):
323323
QApplication.restoreOverrideCursor()
324324
self.progressLabel.setText("")
325325
self.progress.setValue(100)
326-
#self.progress.setMaximum(100)
326+
#self.progress.setMaximum(100)
327327
self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True)
328328
self.buttonBox.button(QtGui.QDialogButtonBox.Close).setEnabled(True)
329329
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)

python/plugins/sextante/gui/BatchProcessingDialog.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def accept(self):
154154
continue
155155
widget = self.table.cellWidget(row, col)
156156
if not self.setParameterValueFromWidget(param, widget, alg):
157-
self.progressLabel.setText("<b>Missing parameter value: " + param.description + " (row " + str(row + 1) + ")</b>")
157+
self.progressLabel.setText("<b>Missing parameter value: " + param.description + " (row " + str(row + 1) + ")</b>")
158158
self.algs = None
159159
return
160160
col+=1
@@ -167,7 +167,7 @@ def accept(self):
167167
out.value = text
168168
col+=1
169169
else:
170-
self.progressLabel.setText("<b>Wrong or missing parameter value: " + out.description + " (row " + str(row + 1) + ")</b>")
170+
self.progressLabel.setText("<b>Wrong or missing parameter value: " + out.description + " (row " + str(row + 1) + ")</b>")
171171
self.algs = None
172172
return
173173
self.algs.append(alg)

python/plugins/sextante/modeler/ModelerGraphicItem.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def paint(self, painter, option, widget=None):
190190

191191
rect = QtCore.QRectF(-(ModelerGraphicItem.BOX_WIDTH + 2)/2.0, -(ModelerGraphicItem.BOX_HEIGHT + 2)/2.0,
192192
ModelerGraphicItem.BOX_WIDTH + 2, ModelerGraphicItem.BOX_HEIGHT + 2)
193-
painter.setPen(QtGui.QPen(QtCore.Qt.gray, 1))
193+
painter.setPen(QtGui.QPen(QtCore.Qt.gray, 1))
194194
color = QtGui.QColor(125,232, 232)
195195
if isinstance(self.element, Parameter):
196196
color = QtGui.QColor(179,179, 255)
@@ -227,7 +227,7 @@ def paint(self, painter, option, widget=None):
227227
painter.drawText(pt, text)
228228
i += 1
229229
i = 1
230-
h = (fm.height() * 1.2)
230+
h = (fm.height() * 1.2)
231231
h = h + ModelerGraphicItem.BOX_HEIGHT / 2.0
232232
pt = QtCore.QPointF(-(ModelerGraphicItem.BOX_WIDTH)/2 + 25, h)
233233
painter.drawText(pt, "Out")
@@ -284,7 +284,7 @@ def itemChange(self, change, value):
284284

285285
def polygon(self):
286286
font = QtGui.QFont("Verdana", 8)
287-
fm = QtGui.QFontMetricsF(font)
287+
fm = QtGui.QFontMetricsF(font)
288288
hUp = (fm.height() * 1.2) * (len(self.element.parameters) + 2)
289289
hDown = (fm.height() * 1.2) * (len(self.element.outputs) + 2)
290290
pol = QtGui.QPolygonF([

python/plugins/sextante/otb/OTBAlgorithm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def processAlgorithm(self, progress):
140140
elif isinstance(param, ParameterMultipleInput):
141141
commands.append(param.name)
142142
files = str(param.value).split(";")
143-
paramvalue = " ".join(["\"" + f + "\"" for f in files])
143+
paramvalue = " ".join(["\"" + f + "\"" for f in files])
144144
commands.append(paramvalue)
145145
elif isinstance(param, ParameterSelection):
146146
commands.append(param.name)

python/plugins/sextante/r/RAlgorithm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -390,12 +390,12 @@ def checkBeforeOpeningParametersDialog(self):
390390
path = RUtils.RFolder()
391391
if path == "":
392392
return "R folder is not configured.\nPlease configure it before running R scripts."
393-
393+
394394
R_INSTALLED = "R_INSTALLED"
395395
settings = QSettings()
396396
if settings.contains(R_INSTALLED):
397397
return
398-
if SextanteUtils.isWindows():
398+
if SextanteUtils.isWindows():
399399
if SextanteConfig.getSetting(RUtils.R_USE64):
400400
execDir = "x64"
401401
else:

python/pyplugin_installer/qgsplugininstallerinstallingdialog.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ def __init__(self, parent, plugin):
4949
self.buttonBox.clicked.connect(self.abort)
5050

5151
url = QUrl(plugin["download_url"])
52-
52+
5353
fileName = plugin["filename"]
5454
tmpDir = QDir.tempPath()
5555
tmpPath = QDir.cleanPath(tmpDir+"/"+fileName)
5656
self.file = QFile(tmpPath)
57-
58-
self.nam = QPNetworkAccessManager(url.host(), )
57+
58+
self.nam = QPNetworkAccessManager(url.host(), )
5959
#self.http = QPHttp(url.host(), port)
6060
self.request = QNetworkRequest(url)
6161
self.reply = self.nam.get( self.request )
@@ -85,7 +85,7 @@ def readProgress(self, done, total):
8585
# ----------------------------------------- #
8686
def requestFinished(self, reply):
8787
self.buttonBox.setEnabled(False)
88-
if reply.error() != QNetworkReply.NoError:
88+
if reply.error() != QNetworkReply.NoError:
8989
self.mResult = self.http.errorString()
9090
self.reject()
9191
return
@@ -121,6 +121,6 @@ def requestFinished(self, reply):
121121
def abort(self):
122122
if self.reply.isRunning():
123123
self.nam.finished.disconnect()
124-
self.reply.abort()
124+
self.reply.abort()
125125
self.mResult = self.tr("Aborted by user")
126126
self.reject()

src/analysis/raster/qgsrastercalcnode.cpp

+21-4
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,36 @@
1515
#include "qgsrastercalcnode.h"
1616
#include <cfloat>
1717

18-
QgsRasterCalcNode::QgsRasterCalcNode(): mLeft( 0 ), mRight( 0 ), mRasterMatrix( 0 ), mNumber( 0 )
18+
QgsRasterCalcNode::QgsRasterCalcNode()
19+
: mLeft( 0 )
20+
, mRight( 0 )
21+
, mNumber( 0 )
1922
{
2023
}
2124

22-
QgsRasterCalcNode::QgsRasterCalcNode( double number ): mType( tNumber ), mLeft( 0 ), mRight( 0 ), mRasterMatrix( 0 ), mNumber( number )
25+
QgsRasterCalcNode::QgsRasterCalcNode( double number )
26+
: mType( tNumber )
27+
, mLeft( 0 )
28+
, mRight( 0 )
29+
, mNumber( number )
2330
{
2431
}
2532

26-
QgsRasterCalcNode::QgsRasterCalcNode( Operator op, QgsRasterCalcNode* left, QgsRasterCalcNode* right ): mType( tOperator ), mLeft( left ), mRight( right ), mRasterMatrix( 0 ), mNumber( 0 ), mOperator( op )
33+
QgsRasterCalcNode::QgsRasterCalcNode( Operator op, QgsRasterCalcNode* left, QgsRasterCalcNode* right )
34+
: mType( tOperator )
35+
, mLeft( left )
36+
, mRight( right )
37+
, mNumber( 0 )
38+
, mOperator( op )
2739
{
2840
}
2941

30-
QgsRasterCalcNode::QgsRasterCalcNode( const QString& rasterName ): mType( tRasterRef ), mLeft( 0 ), mRight( 0 ), mRasterMatrix( 0 ), mNumber( 0 ), mRasterName( rasterName )
42+
QgsRasterCalcNode::QgsRasterCalcNode( const QString& rasterName )
43+
: mType( tRasterRef )
44+
, mLeft( 0 )
45+
, mRight( 0 )
46+
, mNumber( 0 )
47+
, mRasterName( rasterName )
3148
{
3249
}
3350

src/analysis/raster/qgsrastercalcnode.h

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ class ANALYSIS_EXPORT QgsRasterCalcNode
8181
Type mType;
8282
QgsRasterCalcNode* mLeft;
8383
QgsRasterCalcNode* mRight;
84-
QgsRasterMatrix* mRasterMatrix;
8584
double mNumber;
8685
QString mRasterName;
8786
Operator mOperator;

src/app/main.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -254,28 +254,28 @@ void myMessageOutput( QtMsgType type, const char *msg )
254254
{
255255
fprintf( stderr, "Fatal: %s\n", msg );
256256
#if defined(linux) && !defined(ANDROID)
257-
if( access( "/usr/bin/c++filt", X_OK) )
257+
if ( access( "/usr/bin/c++filt", X_OK ) )
258258
{
259259
( void ) write( STDERR_FILENO, "Stacktrace (c++filt NOT FOUND):\n", 32 );
260260
}
261261
else
262262
{
263263
int fd[2];
264264

265-
if( pipe(fd)==0 && fork()==0 )
265+
if ( pipe( fd ) == 0 && fork() == 0 )
266266
{
267-
close( STDIN_FILENO );
268-
close( fd[1] );
269-
dup( fd[0] );
270-
execl( "/usr/bin/c++filt", "c++filt", (char *) 0 );
271-
exit(1);
267+
close( STDIN_FILENO );
268+
close( fd[1] );
269+
dup( fd[0] );
270+
execl( "/usr/bin/c++filt", "c++filt", ( char * ) 0 );
271+
exit( 1 );
272272
}
273273

274274
( void ) write( STDERR_FILENO, "Stacktrace (piped through c++filt):\n", 36 );
275275

276-
close( STDERR_FILENO );
277-
close( fd[0] );
278-
dup( fd[1] );
276+
close( STDERR_FILENO );
277+
close( fd[0] );
278+
dup( fd[1] );
279279
}
280280

281281
void *buffer[256];

src/app/nodetool/qgsselectedfeature.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ void QgsSelectedFeature::createVertexMapPolygon()
421421
const QgsPolyline& poly = polygon[i2];
422422
for ( int i = 0; i < poly.size(); i++ )
423423
{
424-
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], i, tr( "ring %1, vertex %2" ).arg( i2 ).arg( i ) ) );
424+
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], tr( "ring %1, vertex %2" ).arg( i2 ).arg( i ) ) );
425425
}
426426
mVertexMap[y + poly.size() - 1 ]->setEqual( y );
427427
mVertexMap[y]->setEqual( y + poly.size() - 1 );
@@ -441,7 +441,7 @@ void QgsSelectedFeature::createVertexMapPolygon()
441441
const QgsPolyline& poly = poly2[i3];
442442
for ( int i = 0; i < poly.size(); i++ )
443443
{
444-
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], y + i - 1, tr( "polygon %1, ring %2, vertex %3" ).arg( i2 ).arg( i3 ).arg( i ) ) );
444+
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], tr( "polygon %1, ring %2, vertex %3" ).arg( i2 ).arg( i3 ).arg( i ) ) );
445445
}
446446
mVertexMap[y + poly.size() - 1]->setEqual( y );
447447
mVertexMap[y]->setEqual( y + poly.size() - 1 );
@@ -465,7 +465,7 @@ void QgsSelectedFeature::createVertexMapLine()
465465
QgsPolyline poly = mLine[i2];
466466
for ( int i = 0; i < poly.size(); i++ )
467467
{
468-
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], i, tr( "polyline %1, vertex %2" ).arg( i2 ).arg( i ) ) );
468+
mVertexMap.insert( y + i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], tr( "polyline %1, vertex %2" ).arg( i2 ).arg( i ) ) );
469469
}
470470
y += poly.size();
471471
}
@@ -475,7 +475,7 @@ void QgsSelectedFeature::createVertexMapLine()
475475
QgsPolyline poly = mGeometry->asPolyline();
476476
for ( int i = 0; i < poly.size(); i++ )
477477
{
478-
mVertexMap.insert( i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], i, tr( "vertex %1" ).arg( i ) ) );
478+
mVertexMap.insert( i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], tr( "vertex %1" ).arg( i ) ) );
479479
}
480480
}
481481
}
@@ -490,13 +490,13 @@ void QgsSelectedFeature::createVertexMapPoint()
490490
QgsMultiPoint poly = mGeometry->asMultiPoint();
491491
for ( int i = 0; i < poly.size(); i++ )
492492
{
493-
mVertexMap.insert( i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], 1, tr( "point %1" ).arg( i ) ) );
493+
mVertexMap.insert( i, new QgsVertexEntry( mCanvas, mVlayer, poly[i], tr( "point %1" ).arg( i ) ) );
494494
}
495495
}
496496
else
497497
{
498498
// single point
499-
mVertexMap.insert( 1, new QgsVertexEntry( mCanvas, mVlayer, mGeometry->asPoint(), 1, tr( "single point" ) ) );
499+
mVertexMap.insert( 1, new QgsVertexEntry( mCanvas, mVlayer, mGeometry->asPoint(), tr( "single point" ) ) );
500500
}
501501
}
502502

src/app/nodetool/qgsvertexentry.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@
1616
#include "nodetool/qgsvertexentry.h"
1717
#include "qgsmaprenderer.h"
1818

19-
QgsVertexEntry::QgsVertexEntry( QgsMapCanvas *canvas, QgsMapLayer *layer, QgsPoint p, int originalIndex, QString tooltip, QgsVertexMarker::IconType type, int penWidth )
19+
QgsVertexEntry::QgsVertexEntry( QgsMapCanvas *canvas, QgsMapLayer *layer, QgsPoint p, QString tooltip, QgsVertexMarker::IconType type, int penWidth )
2020
: mSelected( false )
2121
, mEquals( -1 )
2222
, mInRubberBand( false )
2323
, mRubberBandNr( 0 )
24-
, mOriginalIndex( originalIndex )
2524
, mPenWidth( penWidth )
2625
, mToolTip( tooltip )
2726
, mType( type )

src/app/nodetool/qgsvertexentry.h

-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class QgsVertexEntry
2929
bool mInRubberBand;
3030
int mRubberBandNr;
3131
int mRubberBandIndex;
32-
int mOriginalIndex;
3332
int mPenWidth;
3433
QString mToolTip;
3534
QgsVertexMarker::IconType mType;
@@ -41,7 +40,6 @@ class QgsVertexEntry
4140
QgsVertexEntry( QgsMapCanvas *canvas,
4241
QgsMapLayer *layer,
4342
QgsPoint p,
44-
int originalIndex,
4543
QString tooltip = QString::null,
4644
QgsVertexMarker::IconType type = QgsVertexMarker::ICON_BOX,
4745
int penWidth = 2 );

src/app/pluginmanager/qgspluginmanager_texts.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
void QgsPluginManager::initTabDescriptions()
77
{
8-
if( !mTabDescriptions.isEmpty() )
8+
if ( !mTabDescriptions.isEmpty() )
99
return;
1010

1111
mTabDescriptions.insert( "installed_plugins", tr( "<h3>Installed Plugins</h3>\
@@ -25,7 +25,7 @@ To <i>enable</i> or <i>disable</i> a plugin,\
2525
Plugins showing in <span style='color:red'>red</span> are not loaded because there is a problem. Consult the \
2626
'Invalid' tab to see more details, or to reinstall or uninstall this plugin.\
2727
</p>\
28-
") );
28+
" ) );
2929

3030

3131

@@ -36,11 +36,11 @@ Here are <b>upgradeable plugins</b>. It means more recent versions of installed
3636
plugins are available in the repositories.\
3737
</p>\
3838
\
39-
") );
39+
" ) );
4040

4141

4242

43-
mTabDescriptions.insert( "get_more_plugins", tr( "<h3>Get more plugins</h3>\
43+
mTabDescriptions.insert( "get_more_plugins", tr( "<h3>Get more plugins</h3>\
4444
\
4545
<p>\
4646
Here you see the list of all plugins available in the repositories, but which are <b>not yet installed</b>.\
@@ -57,7 +57,7 @@ then click the 'Install plugin' button.\
5757
</p>\
5858
\
5959
\
60-
") );
60+
" ) );
6161

6262

6363

@@ -68,7 +68,7 @@ Here you see brand <b>new</b> plugins which can be installed.\
6868
</p>\
6969
\
7070
\
71-
") );
71+
" ) );
7272

7373

7474

@@ -92,6 +92,6 @@ Another common reason is that a python plugin needs some external python librari
9292
You can install them yourself, depending on your operating system. After a correct \
9393
install the plugin should work.\
9494
</p>\
95-
") );
95+
" ) );
9696

9797
}

0 commit comments

Comments
 (0)