Skip to content

Commit 668a44f

Browse files
committedSep 3, 2013
indentation update
1 parent 2572d61 commit 668a44f

22 files changed

+681
-578
lines changed
 

‎python/console/console_output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def insertInitText(self):
138138
"## Type help(iface) for more info and list of methods.\n").format(sys.version,
139139
socket.gethostname())
140140
## some translation string for the console header ends without '\n'
141-
## and the first command in console will be appended at the header text.
141+
## and the first command in console will be appended at the header text.
142142
## The following code add a '\n' at the end of the string if not present.
143143
if txtInit.endswith('\n'):
144144
initText = self.setText(txtInit)

‎python/plugins/fTools/tools/doPointDistance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def compute(self, line1, line2, field1, field2, outPath, matType, nearest, progr
151151
layer2 = ftools_utils.getVectorLayerByName(line2)
152152
if layer1.id() == layer2.id():
153153
if nearest > 0:
154-
nearest = nearest + 1
154+
nearest = nearest + 1
155155
provider1 = layer1.dataProvider()
156156
provider2 = layer2.dataProvider()
157157
sindex = QgsSpatialIndex()

‎python/plugins/processing/gui/CouldNotLoadResultsDialog.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ def setupUi(self):
4040
self.setWindowTitle("Problem loading output layers")
4141
layout = QVBoxLayout()
4242
browser = QtGui.QTextBrowser()
43-
browser.setOpenLinks(False)
43+
browser.setOpenLinks(False)
4444
browser.anchorClicked.connect(self.linkClicked)
4545
html = self.alg.getPostProcessingErrorMessage(self.wrongLayers)
46-
browser.setHtml(html)
46+
browser.setHtml(html)
4747
button = QPushButton()
4848
button.setText("Close")
49-
button.clicked.connect(self.closeButtonPressed)
49+
button.clicked.connect(self.closeButtonPressed)
5050
buttonBox = QtGui.QDialogButtonBox()
51-
buttonBox.setOrientation(QtCore.Qt.Horizontal)
52-
buttonBox.addButton(button, QDialogButtonBox.ActionRole)
51+
buttonBox.setOrientation(QtCore.Qt.Horizontal)
52+
buttonBox.addButton(button, QDialogButtonBox.ActionRole)
5353
layout.addWidget(browser)
5454
layout.addWidget(buttonBox)
5555
self.setLayout(layout)

‎python/plugins/processing/gui/HelpEditionDialog.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class HelpEditionDialog(QDialog, Ui_DlgHelpEdition):
3838

3939
def __init__(self, alg):
4040
QDialog.__init__(self)
41-
42-
self.setupUi(self)
43-
41+
42+
self.setupUi(self)
43+
4444
self.alg = alg
4545
self.descriptions = {}
4646
if self.alg.descriptionFile is not None:
@@ -68,11 +68,11 @@ def accept(self):
6868
pickle.dump(self.descriptions, f)
6969
f.close()
7070
except Exception, e:
71-
QMessageBox.warning(self, "Error saving help file",
71+
QMessageBox.warning(self, "Error saving help file",
7272
"Help file could not be saved."
7373
"\nCheck that you have permission to modify the help file.\n"
7474
"You might not have permission if you are editing an example\n"
75-
"model or script, since they are stored on the installation folder")
75+
"model or script, since they are stored on the installation folder")
7676
QDialog.accept(self)
7777

7878
def getHtml(self):

‎python/plugins/processing/gui/MissingDependencyDialog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ def setupUi(self):
4444
browser.setHtml(self.msg)
4545
button = QPushButton()
4646
button.setText("Close")
47-
button.clicked.connect(self.closeButtonPressed)
47+
button.clicked.connect(self.closeButtonPressed)
4848
buttonBox = QtGui.QDialogButtonBox()
49-
buttonBox.setOrientation(QtCore.Qt.Horizontal)
50-
buttonBox.addButton(button, QDialogButtonBox.ActionRole)
49+
buttonBox.setOrientation(QtCore.Qt.Horizontal)
50+
buttonBox.addButton(button, QDialogButtonBox.ActionRole)
5151
layout.addWidget(browser)
5252
layout.addWidget(buttonBox)
5353
self.setLayout(layout)

‎python/plugins/processing/modeler/CalculatorModelerParametersDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def setParamValues(self):
100100
self.values = {}
101101
self.outputs = {}
102102

103-
name = self.getSafeNameForHarcodedParameter(self.alg.getParameterFromName(self.alg.FORMULA))
103+
name = self.getSafeNameForHarcodedParameter(self.alg.getParameterFromName(self.alg.FORMULA))
104104
value = AlgorithmAndParameter(AlgorithmAndParameter.PARENT_MODEL_ALGORITHM, name)
105105
self.params[self.alg.FORMULA] = value
106106
formula = str(self.formulaText.text())

‎python/plugins/processing/modeler/ModelerParametersDialog.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ def getExtents(self):
283283
params = self.model.parameters
284284
for param in params:
285285
if isinstance(param, ParameterExtent):
286-
extents.append(AlgorithmAndParameter(AlgorithmAndParameter.PARENT_MODEL_ALGORITHM, param.name, "", param.description))
287-
288-
286+
extents.append(AlgorithmAndParameter(AlgorithmAndParameter.PARENT_MODEL_ALGORITHM, param.name, "", param.description))
287+
288+
289289
if self.algIndex is None:
290290
dependent = []
291291
else:
@@ -299,7 +299,7 @@ def getExtents(self):
299299
if isinstance(out, OutputExtent):
300300
extents.append(AlgorithmAndParameter(i, out.name, alg.name, out.description))
301301
i+=1
302-
302+
303303
return extents
304304

305305
def getNumbers(self):

‎python/plugins/processing/modeler/VectorLayerBoundsAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ def processAlgorithm(self, progress):
5656
self.setOutputValue(self.XMAX, layer.extent().xMaximum())
5757
self.setOutputValue(self.YMIN, layer.extent().yMinimum())
5858
self.setOutputValue(self.YMAX, layer.extent().yMaximum())
59-
self.setOutputValue(self.EXTENT,
59+
self.setOutputValue(self.EXTENT,
6060
(layer.extent().xMinimum(), layer.extent().xMaximum(), layer.extent().yMinimum(), layer.extent().yMaximum()))
6161

‎python/plugins/processing/outputs/OutputExtent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, name="", description=""):
3232
self.description = description
3333
self.value = None
3434
self.hidden = True
35-
35+
3636
def setValue(self, value):
3737
try:
3838
if value != None and isinstance(value, basestring):
@@ -41,4 +41,4 @@ def setValue(self, value):
4141
self.value = ",".join([str(v) for v in value])
4242
return True
4343
except:
44-
return False
44+
return False

‎python/plugins/processing/outputs/OutputTable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def getCompatibleFileName(self, alg):
5252
return self.value
5353
else:
5454
if self.compatible is None:
55-
self.compatible = ProcessingUtils.getTempFilenameInTempFolder(self.name + "." + self.getDefaultFileExtension(alg))
55+
self.compatible = ProcessingUtils.getTempFilenameInTempFolder(self.name + "." + self.getDefaultFileExtension(alg))
5656
return self.compatible;
5757

5858
def getTableWriter(self, fields):

‎python/plugins/processing/outputs/OutputVector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def getCompatibleFileName(self, alg):
5555
return self.value
5656
else:
5757
if self.compatible is None:
58-
self.compatible = ProcessingUtils.getTempFilenameInTempFolder(self.name + "." + self.getDefaultFileExtension(alg))
58+
self.compatible = ProcessingUtils.getTempFilenameInTempFolder(self.name + "." + self.getDefaultFileExtension(alg))
5959
return self.compatible;
6060

6161

‎python/plugins/processing/r/EditRScriptDialog.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def setupUi(self):
5353
Qt.WindowMinMaxButtonsHint)
5454
self.setWindowTitle("Edit script")
5555
layout = QVBoxLayout()
56-
self.text = ScriptEditorWidget(self.alg.script if self.alg is not None else "")
56+
self.text = ScriptEditorWidget(self.alg.script if self.alg is not None else "")
5757
self.buttonBox = QtGui.QDialogButtonBox()
5858
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
5959
if self.alg != None:
@@ -144,7 +144,7 @@ def cancelPressed(self):
144144
self.close()
145145

146146
from PyQt4.Qsci import QsciScintilla
147-
147+
148148
class ScriptEditorWidget(QsciScintilla):
149149
ARROW_MARKER_NUM = 8
150150

@@ -170,6 +170,6 @@ def __init__(self, text, parent=None):
170170
self.setCaretLineBackgroundColor(QColor("#ffe4e4"))
171171

172172
self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, 1, 'Courier')
173-
173+
174174
self.setText(text)
175-
175+

‎python/plugins/processing/saga/SagaAlgorithm.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ def processAlgorithm(self, progress):
306306
if isinstance(out, OutputRaster):
307307
filename = out.getCompatibleFileName(self)
308308
filename2 = ProcessingUtils.tempFolder() + os.sep + os.path.basename(filename) + ".sgrd"
309-
formatIndex = 1 if saga208 else 4
310-
if ProcessingUtils.isWindows() or ProcessingUtils.isMac() or not saga208:
309+
formatIndex = 1 if saga208 else 4
310+
if ProcessingUtils.isWindows() or ProcessingUtils.isMac() or not saga208:
311311
commands.append("io_gdal 1 -GRIDS \"" + filename2 + "\" -FORMAT " + str(formatIndex) +" -TYPE 0 -FILE \"" + filename + "\"");
312312
else:
313313
commands.append("libio_gdal 1 -GRIDS \"" + filename2 + "\" -FORMAT 1 -TYPE 0 -FILE \"" + filename + "\"");
@@ -378,12 +378,12 @@ def resampleRasterLayer(self,layer):
378378
return s
379379

380380

381-
def exportRasterLayer(self, source):
381+
def exportRasterLayer(self, source):
382382
layer = QGisLayers.getObjectFromUri(source, False)
383383
if layer:
384384
filename = str(layer.name())
385385
else:
386-
filename = source.rstrip(".sgrd")
386+
filename = source.rstrip(".sgrd")
387387
validChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:"
388388
filename = ''.join(c for c in filename if c in validChars)
389389
if len(filename) == 0:
@@ -395,8 +395,8 @@ def exportRasterLayer(self, source):
395395
return "io_gdal 0 -GRIDS \"" + destFilename + "\" -FILES \"" + source+"\""
396396
else:
397397
return "libio_gdal 0 -GRIDS \"" + destFilename + "\" -FILES \"" + source + "\""
398-
399-
398+
399+
400400

401401

402402
def checkBeforeOpeningParametersDialog(self):

‎python/plugins/processing/saga/SagaAlgorithmProvider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def __init__(self):
4545
def initializeSettings(self):
4646
AlgorithmProvider.initializeSettings(self)
4747
if ProcessingUtils.isWindows():
48-
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_FOLDER, "SAGA folder", SagaUtils.sagaPath()))
49-
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_208, "Enable SAGA 2.0.8 compatibility", False))
48+
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_FOLDER, "SAGA folder", SagaUtils.sagaPath()))
49+
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_208, "Enable SAGA 2.0.8 compatibility", False))
5050
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_AUTO_RESAMPLING, "Use min covering grid system for resampling", True))
5151
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_LOG_COMMANDS, "Log execution commands", True))
5252
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_LOG_CONSOLE, "Log console output", True))

‎python/plugins/processing/script/EditScriptDialog.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def setupUi(self):
5252
Qt.WindowMinMaxButtonsHint)
5353
self.setWindowTitle("Edit script")
5454
layout = QVBoxLayout()
55-
self.text = ScriptEditorWidget(self.alg.script if self.alg is not None else "")
55+
self.text = ScriptEditorWidget(self.alg.script if self.alg is not None else "")
5656
self.buttonBox = QtGui.QDialogButtonBox()
5757
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
5858
self.editHelpButton = QtGui.QPushButton()
@@ -120,9 +120,9 @@ def saveAlgorithm(self):
120120
def cancelPressed(self):
121121
#self.update = False
122122
self.close()
123-
123+
124124
from PyQt4.Qsci import QsciScintilla, QsciLexerPython
125-
125+
126126
class ScriptEditorWidget(QsciScintilla):
127127
ARROW_MARKER_NUM = 8
128128

@@ -151,6 +151,6 @@ def __init__(self, text, parent=None):
151151
lexer.setDefaultFont(font)
152152
self.setLexer(lexer)
153153
self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, 1, 'Courier')
154-
154+
155155
self.setText(text)
156-
156+

‎src/app/qgsmeasuredialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void QgsMeasureDialog::updateUi()
222222
toolTip += "<br> * " + tr( "Project CRS transformation is turned off." ) + " ";
223223
toolTip += tr( "Canvas units setting is taken from project properties setting (%1)." ).arg( QGis::tr( mCanvasUnits ) );
224224
toolTip += "<br> * " + tr( "Ellipsoidal calculation is not possible, as project CRS is undefined." );
225-
setWindowTitle( tr("Measure (OTF off)"));
225+
setWindowTitle( tr( "Measure (OTF off)" ) );
226226
}
227227
else
228228
{
@@ -236,7 +236,7 @@ void QgsMeasureDialog::updateUi()
236236
toolTip += "<br> * " + tr( "Project CRS transformation is turned on but ellipsoidal calculation is not selected." );
237237
toolTip += "<br> * " + tr( "The canvas units setting is taken from the project CRS (%1)." ).arg( QGis::tr( mCanvasUnits ) );
238238
}
239-
setWindowTitle( tr("Measure (OTF on)"));
239+
setWindowTitle( tr( "Measure (OTF on)" ) );
240240
}
241241

242242
if (( mCanvasUnits == QGis::Meters && mDisplayUnits == QGis::Feet ) || ( mCanvasUnits == QGis::Feet && mDisplayUnits == QGis::Meters ) )

‎src/core/qgsfield.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ class CORE_EXPORT QgsFields
163163
{
164164
public:
165165

166-
enum FieldOrigin {
166+
enum FieldOrigin
167+
{
167168
OriginUnknown, //!< it has not been specified where the field comes from
168169
OriginProvider, //!< field comes from the underlying data provider of the vector layer (originIndex = index in provider's fields)
169170
OriginJoin, //!< field comes from a joined layer (originIndex / 1000 = index of the join, originIndex % 1000 = index within the join)

‎src/core/raster/qgsrasterrenderer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ QString QgsRasterRenderer::minMaxOriginLabel( int theOrigin )
195195
QString est_exact;
196196
QString values;
197197
QString extent;
198-
198+
199199
if ( theOrigin & MinMaxEstimated )
200200
{
201201
est_exact = tr( "Estimated" );
@@ -227,11 +227,11 @@ QString QgsRasterRenderer::minMaxOriginLabel( int theOrigin )
227227
extent = tr( "sub extent" );
228228
}
229229

230-
label = QCoreApplication::translate ( "QgsRasterRenderer", "%1 %2 of %3.",
231-
"min/max origin label in raster properties, where %1 - estimated/exact, %2 - values (min/max, stddev, etc.), %3 - extent" )
232-
.arg(est_exact)
233-
.arg(values)
234-
.arg(extent);
230+
label = QCoreApplication::translate( "QgsRasterRenderer", "%1 %2 of %3.",
231+
"min/max origin label in raster properties, where %1 - estimated/exact, %2 - values (min/max, stddev, etc.), %3 - extent" )
232+
.arg( est_exact )
233+
.arg( values )
234+
.arg( extent );
235235
return label;
236236
}
237237

‎tests/src/python/qgis_local_server_spawn/flup/server/ajp_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ def _forwardRequest(self, pkt):
717717
if self._timeout:
718718
old_alarm = signal.signal(signal.SIGALRM, self.timeout_handler)
719719
signal.alarm(self._timeout)
720-
720+
721721
# Run Request.
722722
req.run()
723723

‎tests/src/python/qgis_local_server_spawn/flup/server/threadedserver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def run(self, sock, timeout=1.0):
6969

7070
# Set close-on-exec
7171
setCloseOnExec(sock)
72-
72+
7373
# Main loop.
7474
while self._keepGoing:
7575
try:
@@ -88,7 +88,7 @@ def run(self, sock, timeout=1.0):
8888
raise
8989

9090
setCloseOnExec(clientSock)
91-
91+
9292
if not self._isClientAllowed(addr):
9393
clientSock.close()
9494
continue
@@ -110,7 +110,7 @@ def run(self, sock, timeout=1.0):
110110

111111
# Return bool based on whether or not SIGHUP was received.
112112
return self._hupReceived
113-
113+
114114
def shutdown(self):
115115
"""Wait for running threads to finish."""
116116
self._threadPool.shutdown()

‎tests/src/python/qgis_local_server_spawn/flup/server/threadpool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ def __init__(self, minSpare=1, maxSpare=5, maxThreads=sys.maxint):
5353
# Start the minimum number of worker threads.
5454
for i in range(maxSpare):
5555
self._start_new_thread()
56-
56+
5757
def _start_new_thread(self):
5858
t = threading.Thread(target=self._worker)
5959
self._threads.append(t)
6060
t.setDaemon(True)
6161
t.start()
6262
return t
63-
63+
6464
def shutdown(self):
6565
"""shutdown all workers."""
6666
self._lock.acquire()
@@ -116,7 +116,7 @@ def _worker(self):
116116
while True:
117117
while not self._workQueue and not self._stop:
118118
self._lock.wait()
119-
119+
120120
if self._stop:
121121
return
122122

‎tests/src/python/qgis_local_server_spawn/spawn-fcgi/src/spawn-fcgi.c

Lines changed: 622 additions & 520 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.