Skip to content

Commit bf64f8d

Browse files
committed
spelling fixes and indentation update
1 parent 339fd75 commit bf64f8d

File tree

24 files changed

+66
-62
lines changed

24 files changed

+66
-62
lines changed

python/core/composer/qgscomposermapgrid.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class QgsComposerMapGridStack : QgsComposerMapItemStack
106106

107107
/** Calculates the maximum distance grids within the stack extend beyond the
108108
* QgsComposerMap's item rect. This method calculates the distance for each side of the
109-
* map item seperately
109+
* map item separately
110110
* @param top storage for top extension
111111
* @param right storage for right extension
112112
* @param bottom storage for bottom extension
@@ -303,7 +303,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
303303

304304
/** Calculates the maximum distance the grid extends beyond the
305305
* QgsComposerMap's item rect. This method calculates the distance for each side of the
306-
* map item seperately
306+
* map item separately
307307
* @param top storage for top extension
308308
* @param right storage for right extension
309309
* @param bottom storage for bottom extension

python/core/geometry/qgsgeometry.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ class QgsGeometry
701701

702702
/** Creates and returns a new geometry engine*/
703703
static QgsGeometryEngine* createGeometryEngine( const QgsAbstractGeometryV2* geometry ) /Factory/;
704-
704+
705705
/** Upgrades a point list from QgsPoint to QgsPointV2
706706
* @param input list of QgsPoint objects to be upgraded
707707
* @param output destination for list of points converted to QgsPointV2
@@ -712,7 +712,7 @@ class QgsGeometry
712712
* @param input list of QgsPointV2 objects to be downgraded
713713
* @param output destination for list of points converted to QgsPoint
714714
*/
715-
static void convertPointList( const QList<QgsPointV2>& input, QList<QgsPoint>& output );
715+
static void convertPointList( const QList<QgsPointV2>& input, QList<QgsPoint>& output );
716716

717717
}; // class QgsGeometry
718718

python/core/qgsstringutils.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class QgsStringUtils
1717
* @param string1 first string
1818
* @param string2 second string
1919
* @param caseSensitive set to true for case sensitive comparison
20-
* @returns edit distance. Lower distances indicate more similiar strings.
20+
* @returns edit distance. Lower distances indicate more similar strings.
2121
*/
2222
static int levenshteinDistance( const QString &string1, const QString &string2, bool caseSensitive = false );
2323

python/plugins/db_manager/db_plugins/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, e):
3838
msg = e
3939

4040
if not isinstance(msg, unicode):
41-
msg = unicode(msg, 'utf-8', 'replace') # convert from utf8 and replace errors (if any)
41+
msg = unicode(msg, 'utf-8', 'replace') # convert from utf8 and replace errors (if any)
4242

4343
self.msg = msg
4444
Exception.__init__(self, msg)

python/plugins/db_manager/dlg_sql_window.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,7 @@ def setColumnCombos(self, cols, quotedCols):
323323
except:
324324
defaultUniqueCol = None
325325

326-
colNames = zip(cols, quotedCols)
327-
colNames.sort()
326+
colNames = sorted(zip(cols, quotedCols))
328327
newItems = []
329328
uniqueIsFilled = False
330329
for (col, quotedCol) in colNames:
@@ -352,7 +351,6 @@ def setColumnCombos(self, cols, quotedCols):
352351
if self.uniqueModel.findItems(previousUniqueColumn):
353352
self.uniqueCombo.setEditText(previousUniqueColumn)
354353
uniqueIsFilled = True
355-
356354

357355
oldGeometryColumn = self.geomCombo.currentText()
358356
self.geomCombo.clear()

python/plugins/fTools/fTools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def initGui(self):
201201
self.intersect.setObjectName("intersect")
202202
self.union = QAction(QCoreApplication.translate("fTools", "Union..."), self.iface.mainWindow())
203203
self.union.setObjectName("union")
204-
self.symDifference = QAction(QCoreApplication.translate("fTools", "Symetrical Difference..."), self.iface.mainWindow())
204+
self.symDifference = QAction(QCoreApplication.translate("fTools", "Symmetrical Difference..."), self.iface.mainWindow())
205205
self.symDifference.setObjectName("symDifference")
206206
self.clip = QAction(QCoreApplication.translate("fTools", "Clip..."), self.iface.mainWindow())
207207
self.clip.setObjectName("clip")

python/plugins/fTools/tools/doGeoprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def populateLayers(self):
210210
#4: Dissolve
211211
#5: Intersection
212212
#6: Union
213-
#7: Symetrical Difference
213+
#7: Symmetrical Difference
214214
#8: Clip
215215

216216
def geoprocessing(self, myLayerA, myLayerB, myParam, myMerge, mySelectionA, mySelectionB, mySegments):

python/plugins/processing/algs/qgis/Dissolve.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ def defineCharacteristics(self):
122122
self.name = 'Dissolve'
123123
self.group = 'Vector geometry tools'
124124
self.addParameter(ParameterVector(Dissolve.INPUT,
125-
self.tr('Input layer'),
126-
[ParameterVector.VECTOR_TYPE_POLYGON, ParameterVector.VECTOR_TYPE_LINE]))
125+
self.tr('Input layer'),
126+
[ParameterVector.VECTOR_TYPE_POLYGON, ParameterVector.VECTOR_TYPE_LINE]))
127127
self.addParameter(ParameterBoolean(Dissolve.DISSOLVE_ALL,
128-
self.tr('Dissolve all (do not use field)'), True))
128+
self.tr('Dissolve all (do not use field)'), True))
129129
self.addParameter(ParameterTableField(Dissolve.FIELD,
130-
self.tr('Unique ID field'), Dissolve.INPUT, optional=True))
130+
self.tr('Unique ID field'), Dissolve.INPUT, optional=True))
131131
self.addOutput(OutputVector(Dissolve.OUTPUT, self.tr('Dissolved')))

python/plugins/processing/algs/qgis/SymmetricalDifference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
"""
44
***************************************************************************
5-
SymetricalDifference.py
5+
SymmetricalDifference.py
66
---------------------
77
Date : September 2014
88
Copyright : (C) 2014 by Alexander Bruy
@@ -47,7 +47,7 @@ def defineCharacteristics(self):
4747
self.addParameter(ParameterVector(self.OVERLAY,
4848
self.tr('Difference layer'), [ParameterVector.VECTOR_TYPE_ANY]))
4949
self.addOutput(OutputVector(self.OUTPUT,
50-
self.tr('Symetrical difference')))
50+
self.tr('Symmetrical difference')))
5151

5252
def processAlgorithm(self, progress):
5353
layerA = dataobjects.getObjectFromUri(

python/plugins/processing/tools/system.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def isMac():
5555

5656
_tempFolderSuffix = unicode(uuid.uuid4()).replace('-', '')
5757

58+
5859
def tempFolder():
5960
tempDir = os.path.join(unicode(QDir.tempPath()), 'processing' + _tempFolderSuffix)
6061
if not QDir(tempDir).exists():

src/core/composer/qgscomposermapgrid.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class CORE_EXPORT QgsComposerMapGridStack : public QgsComposerMapItemStack
138138

139139
/** Calculates the maximum distance grids within the stack extend beyond the
140140
* QgsComposerMap's item rect. This method calculates the distance for each side of the
141-
* map item seperately
141+
* map item separately
142142
* @param top storage for top extension
143143
* @param right storage for right extension
144144
* @param bottom storage for bottom extension
@@ -334,7 +334,7 @@ class CORE_EXPORT QgsComposerMapGrid : public QgsComposerMapItem
334334

335335
/** Calculates the maximum distance the grid extends beyond the
336336
* QgsComposerMap's item rect. This method calculates the distance for each side of the
337-
* map item seperately
337+
* map item separately
338338
* @param top storage for top extension
339339
* @param right storage for right extension
340340
* @param bottom storage for bottom extension

src/core/symbology-ng/qgsrendererv2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class CORE_EXPORT QgsFeatureRendererV2
139139
* You do not need to specify the extent in here, this is taken care of separately and
140140
* will be combined with a filter returned from this method.
141141
*
142-
* @return An expresion used as where clause
142+
* @return An expression used as where clause
143143
*/
144144
virtual QString filter() { return QString::null; }
145145

src/gui/qgsattributeform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ QgsAttributeForm::QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature &featur
5353
initPython();
5454
setFeature( feature );
5555

56-
// Using attributeAdded() attributeDeleted() are not emited on all fields changes (e.g. layer fields changed,
56+
// Using attributeAdded() attributeDeleted() are not emitted on all fields changes (e.g. layer fields changed,
5757
// joined fields changed) -> use updatedFields() instead
5858
#if 0
5959
connect( vl, SIGNAL( attributeAdded( int ) ), this, SLOT( onAttributeAdded( int ) ) );

src/gui/qgscredentialdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void QgsCredentialDialog::requestCredentialsMasterPassword( QString * password,
200200
chkbxEraseAuthDb->setChecked( false );
201201
lblSavedForSession->setVisible( true );
202202

203-
// reenable OK button or non-master-password requests will be blocked
203+
// re-enable OK button or non-master-password requests will be blocked
204204
// needs to come after leMasterPass->clear() or textChanged auto-slot with disable it again
205205
mOkButton->setEnabled( true );
206206

src/plugins/geometry_snapper/qgsgeometrysnapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ void QgsGeometrySnapper::processFeature( const QgsFeatureId &id )
196196
delete subjSnapIndex;
197197
delete origSubjSnapIndex;
198198

199-
// Pass 3: remove superfluous vertices: all vertices which are snapped to a segment and not preceeded or succeeded by an unsnapped vertex
199+
// Pass 3: remove superfluous vertices: all vertices which are snapped to a segment and not preceded or succeeded by an unsnapped vertex
200200
for ( int iPart = 0, nParts = subjGeom->partCount(); iPart < nParts; ++iPart )
201201
{
202202
for ( int iRing = 0, nRings = subjGeom->ringCount( iPart ); iRing < nRings; ++iRing )

src/plugins/grass/qgsgrassmoduleoptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions(
334334

335335
#if 0
336336
// This works, but it would mean to desable check if 'field' tag has 'layer' defined in qgm.
337-
// It is probably better to require 'layer' attribute, so that it is always explicitely defined,
337+
// It is probably better to require 'layer' attribute, so that it is always explicitly defined,
338338
// and we are sure it is set for modules with more inputs, where auto connection cannot be used
339339
// (guidependency missing in GRASS 6)
340340
// Add default inter param relations

src/plugins/grass/scripts/qgis.v.upgrade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def main():
6565
grass.warning('Cannot create new DB connection')
6666
return
6767

68-
grass.message('Transfering tables to the new DB')
68+
grass.message('Transferring tables to the new DB')
6969
if grass.run_command('v.db.reconnect.all', flags='cd') != 0:
7070
grass.warning('Cannot transfer tables')
7171

src/providers/grass/qgsgrass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2886,7 +2886,7 @@ QgsGrass::ModuleOutput QgsGrass::parseModuleOutput( const QString & input, QStri
28862886
QRegExp rxwarning( "GRASS_INFO_WARNING\\(\\d+,\\d+\\): (.*)" );
28872887
QRegExp rxerror( "GRASS_INFO_ERROR\\(\\d+,\\d+\\): (.*)" );
28882888
QRegExp rxend( "GRASS_INFO_END\\(\\d+,\\d+\\)" );
2889-
// GRASS added G_progress() which does not suport GRASS_MESSAGE_FORMAT=gui
2889+
// GRASS added G_progress() which does not support GRASS_MESSAGE_FORMAT=gui
28902890
// and it is printing fprintf(stderr, "%10ld\b\b\b\b\b\b\b\b\b\b", n);
28912891
// Ticket created https://trac.osgeo.org/grass/ticket/2751
28922892
QRegExp rxprogress( " +(\\d+)\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b" );

src/providers/grass/qgsgrass.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject
603603
* @param input input string read from module stderr
604604
* @param text parsed text
605605
* @param html html formated parsed text, e.g. + icons
606-
* @param value percent 0-100 or progress as absolut number if total is unknown*/
606+
* @param value percent 0-100 or progress as absolute number if total is unknown*/
607607
static ModuleOutput parseModuleOutput( const QString & input, QString &text, QString &html, int &value );
608608

609609
public slots:
@@ -625,7 +625,7 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject
625625
/** Signal emitted after mapset was opened */
626626
void mapsetChanged();
627627

628-
/** Signal emited when mapset search path changed (SEARCH_PATH file changed and it was loaded to mMapsetSearchPath) */
628+
/** Signal emitted when mapset search path changed (SEARCH_PATH file changed and it was loaded to mMapsetSearchPath) */
629629
void mapsetSearchPathChanged();
630630

631631
/** Emitted when path to modules config dir changed */
@@ -635,7 +635,7 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject
635635
void modulesDebugChanged();
636636

637637
/** Emitted when current region changed
638-
* TODO: currently only emited when writeRegion is called, add file system watcher
638+
* TODO: currently only emitted when writeRegion is called, add file system watcher
639639
* to get also changes done outside QGIS or by modules.
640640
*/
641641
void regionChanged();

src/providers/grass/qgsgrassvectormap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class GRASS_LIB_EXPORT QgsGrassVectorMapStore
213213

214214
static QgsGrassVectorMapStore *instance();
215215

216-
// Default instance may be overriden explicitely to avoid (temporarily) to share maps by providers
216+
// Default instance may be overriden explicitly to avoid (temporarily) to share maps by providers
217217
// This is only used for editing test to have an independent map
218218
static void setStore( QgsGrassVectorMapStore * store ) { mStore = store; }
219219

src/providers/grass/qgsgrassvectormaplayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ void QgsGrassVectorMapLayer::updateFields()
350350
{
351351
QgsDebugMsg( "entered" );
352352

353-
// update fields to pass layer/buffer check when commiting
353+
// update fields to pass layer/buffer check when committing
354354
for ( int i = mFields.size() - 1; i >= 0; i-- )
355355
{
356356
QgsField field = mFields.at( i );

src/providers/grass/qgsgrasswin.cpp

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,42 @@
2828
#ifdef Q_OS_WIN
2929
// Ideas/code from http://stackoverflow.com/questions/20162359/c-best-way-to-get-window-handle-of-the-only-window-from-a-process-by-process
3030
// Get window for pid
31-
struct EnumData {
32-
DWORD dwProcessId;
33-
HWND hWnd;
31+
struct EnumData
32+
{
33+
DWORD dwProcessId;
34+
HWND hWnd;
3435
};
35-
BOOL CALLBACK EnumProc( HWND hWnd, LPARAM lParam ) {
36-
EnumData& ed = *(EnumData*)lParam;
37-
DWORD dwProcessId = 0x0;
38-
GetWindowThreadProcessId( hWnd, &dwProcessId );
39-
if ( ed.dwProcessId == dwProcessId ) {
40-
ed.hWnd = hWnd;
41-
SetLastError( ERROR_SUCCESS );
42-
return FALSE;
43-
}
44-
return TRUE;
36+
BOOL CALLBACK EnumProc( HWND hWnd, LPARAM lParam )
37+
{
38+
EnumData& ed = *( EnumData* )lParam;
39+
DWORD dwProcessId = 0x0;
40+
GetWindowThreadProcessId( hWnd, &dwProcessId );
41+
if ( ed.dwProcessId == dwProcessId )
42+
{
43+
ed.hWnd = hWnd;
44+
SetLastError( ERROR_SUCCESS );
45+
return FALSE;
46+
}
47+
return TRUE;
4548
}
46-
HWND FindWindowFromProcessId( DWORD dwProcessId ) {
47-
EnumData ed = { dwProcessId };
48-
if ( !EnumWindows( EnumProc, (LPARAM)&ed ) &&
49-
( GetLastError() == ERROR_SUCCESS ) ) {
50-
return ed.hWnd;
51-
}
52-
return NULL;
49+
HWND FindWindowFromProcessId( DWORD dwProcessId )
50+
{
51+
EnumData ed = { dwProcessId };
52+
if ( !EnumWindows( EnumProc, ( LPARAM )&ed ) &&
53+
( GetLastError() == ERROR_SUCCESS ) )
54+
{
55+
return ed.hWnd;
56+
}
57+
return NULL;
5358
}
5459
#endif
5560

5661
void QgsGrassWin::hideWindow( int pid )
5762
{
58-
Q_UNUSED(pid)
59-
QgsDebugMsg( QString("pid = %1").arg(pid) );
63+
Q_UNUSED( pid )
64+
QgsDebugMsg( QString( "pid = %1" ).arg( pid ) );
6065
#ifdef Q_OS_WIN
61-
HWND hWnd = FindWindowFromProcessId( (DWORD)pid );
66+
HWND hWnd = FindWindowFromProcessId(( DWORD )pid );
6267
if ( hWnd )
6368
{
6469
QgsDebugMsg( "driver window found -> minimize" );
@@ -68,6 +73,6 @@ void QgsGrassWin::hideWindow( int pid )
6873
QgsDebugMsg( "cannot find driver window" );
6974
}
7075
// Unfortunately the window opens first for a moment
71-
ShowWindow( hWnd, SW_HIDE);
76+
ShowWindow( hWnd, SW_HIDE );
7277
#endif
7378
}

src/providers/postgres/qgspgtablemodel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void QgsPgTableModel::addTableEntry( const QgsPostgresLayerProperty& layerProper
126126
childItemList << selItem;
127127
childItemList << sqlItem;
128128

129-
Q_FOREACH( QStandardItem *item, childItemList )
129+
Q_FOREACH ( QStandardItem *item, childItemList )
130130
{
131131
if ( tip.isEmpty() )
132132
{
@@ -365,7 +365,7 @@ QString QgsPgTableModel::layerURI( const QModelIndex &index, const QString& conn
365365
QgsDataSourceURI uri( connInfo );
366366

367367
QStringList cols;
368-
Q_FOREACH( const QString& col, s1 )
368+
Q_FOREACH ( const QString& col, s1 )
369369
{
370370
cols << QgsPostgresConn::quotedIdentifier( col );
371371
}

tests/src/python/test_provider_postgres.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ class TestPyQgsPostgresProvider(TestCase, ProviderTestCase):
3636
def setUpClass(cls):
3737
"""Run before all tests"""
3838
cls.dbconn = u'dbname=\'qgis_test\' host=localhost port=5432 user=\'postgres\' password=\'postgres\''
39-
if os.environ.has_key('QGIS_PGTEST_DB'):
39+
if 'QGIS_PGTEST_DB' in os.environ:
4040
cls.dbconn = os.environ['QGIS_PGTEST_DB']
4141
# Create test layer
42-
cls.vl = QgsVectorLayer( cls.dbconn + ' sslmode=disable key=\'pk\' srid=4326 type=POINT table="qgis_test"."someData" (geom) sql=', 'test', 'postgres')
42+
cls.vl = QgsVectorLayer(cls.dbconn + ' sslmode=disable key=\'pk\' srid=4326 type=POINT table="qgis_test"."someData" (geom) sql=', 'test', 'postgres')
4343
assert(cls.vl.isValid())
4444
cls.provider = cls.vl.dataProvider()
4545

@@ -60,9 +60,9 @@ def testDefaultValue(self):
6060
assert self.provider.defaultValue(2) == '\'qgis\'::text'
6161

6262
def testWkbTypes(self):
63-
def test_table( dbconn, table_name, wkt ):
64-
vl = QgsVectorLayer( '%s srid=4326 table="qgis_test".%s (geom) sql=' % (dbconn, table_name), "testgeom", "postgres" )
65-
assert( vl.isValid() )
63+
def test_table(dbconn, table_name, wkt):
64+
vl = QgsVectorLayer('%s srid=4326 table="qgis_test".%s (geom) sql=' % (dbconn, table_name), "testgeom", "postgres")
65+
assert(vl.isValid())
6666
for f in vl.getFeatures():
6767
print f.geometry().exportToWkt(), wkt
6868
assert f.geometry().exportToWkt() == wkt

0 commit comments

Comments
 (0)