Skip to content

Commit

Permalink
indentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 12, 2015
1 parent c3f4830 commit 23ea045
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
6 changes: 3 additions & 3 deletions python/plugins/processing/algs/qgis/Dissolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def processAlgorithm(self, progress):
useField = True
except:
useField = False

countField = QgsField("count", QVariant.Int, '', 10, 0)
fields.append(countField)
writer = self.getOutputFromName(
Expand Down Expand Up @@ -113,7 +113,7 @@ def processAlgorithm(self, progress):

for key, value in myDict.items():
nElement += 1
progress.setPercentage(int(nElement * 100/ nFeat))
progress.setPercentage(int(nElement * 100 / nFeat))
for i in range(len(value)):
if i == 0:
tempItem = value[i]
Expand Down Expand Up @@ -143,6 +143,6 @@ def defineCharacteristics(self):
self.tr('Input layer'),
[ParameterVector.VECTOR_TYPE_POLYGON, ParameterVector.VECTOR_TYPE_LINE]))
self.addParameter(ParameterTableField(Dissolve.FIELD,
self.tr('Dissolve field (if not set all features are dissolved)'),
self.tr('Dissolve field (if not set all features are dissolved)'),
Dissolve.INPUT, optional=True))
self.addOutput(OutputVector(Dissolve.OUTPUT, self.tr('Dissolved')))
4 changes: 2 additions & 2 deletions python/plugins/processing/modeler/ModelerDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self, alg=None):
self.setWindowFlags(Qt.WindowMinimizeButtonHint |
Qt.WindowMaximizeButtonHint |
Qt.WindowCloseButtonHint)

settings = QSettings()
self.splitter.restoreState(settings.value("/Processing/splitterModeler", QByteArray()))
self.restoreGeometry(settings.value("/Processing/geometryModeler", QByteArray()))
Expand Down Expand Up @@ -210,7 +210,7 @@ def closeEvent(self, evt):
settings = QSettings()
settings.setValue("/Processing/splitterModeler", self.splitter.saveState())
settings.setValue("/Processing/geometryModeler", self.saveGeometry())

if self.hasChanged:
ret = QMessageBox.question(
self, self.tr('Unsaved changes'),
Expand Down
8 changes: 4 additions & 4 deletions src/core/qgsdatasourceuri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,9 @@ QString QgsDataSourceURI::uri() const
QByteArray QgsDataSourceURI::encodedUri() const
{
QUrl url;
Q_FOREACH( const QString& key, mParams.uniqueKeys() )
Q_FOREACH ( const QString& key, mParams.uniqueKeys() )
{
Q_FOREACH( const QString& value, mParams.values( key ) )
Q_FOREACH ( const QString& value, mParams.values( key ) )
{
url.addQueryItem( key, value );
}
Expand All @@ -568,7 +568,7 @@ void QgsDataSourceURI::setEncodedUri( const QByteArray & uri )
QUrl url;
url.setEncodedQuery( uri );
QPair<QString, QString> item;
Q_FOREACH( item, url.queryItems() )
Q_FOREACH ( item, url.queryItems() )
{
mParams.insertMulti( item.first, item.second );
}
Expand Down Expand Up @@ -664,7 +664,7 @@ void QgsDataSourceURI::setParam( const QString &key, const QString &value )

void QgsDataSourceURI::setParam( const QString &key, const QStringList &value )
{
Q_FOREACH( const QString& val, value )
Q_FOREACH ( const QString& val, value )
{
mParams.insertMulti( key, val );
}
Expand Down
8 changes: 4 additions & 4 deletions src/providers/postgres/qgspostgresdataitems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ QVector<QgsDataItem*> QgsPGConnectionItem::createChildren()
return items;
}

Q_FOREACH( const QgsPostgresSchemaProperty& schema, schemas )
Q_FOREACH ( const QgsPostgresSchemaProperty& schema, schemas )
{
QgsPGSchemaItem * schemaItem = new QgsPGSchemaItem( this, mName, schema.name, mPath + "/" + schema.name );
if ( !schema.description.isEmpty() )
Expand Down Expand Up @@ -209,7 +209,7 @@ bool QgsPGConnectionItem::handleDrop( const QMimeData * data, QString toSchema )
QStringList importResults;
bool hasError = false;
QgsMimeDataUtils::UriList lst = QgsMimeDataUtils::decodeUriList( data );
Q_FOREACH( const QgsMimeDataUtils::Uri& u, lst )
Q_FOREACH ( const QgsMimeDataUtils::Uri& u, lst )
{
if ( u.layerType != "vector" )
{
Expand Down Expand Up @@ -484,7 +484,7 @@ QVector<QgsDataItem*> QgsPGSchemaItem::createChildren()
}

bool dontResolveType = QgsPostgresConn::dontResolveType( mConnectionName );
Q_FOREACH( QgsPostgresLayerProperty layerProperty, layerProperties )
Q_FOREACH ( QgsPostgresLayerProperty layerProperty, layerProperties )
{
if ( layerProperty.schemaName != mName )
continue;
Expand Down Expand Up @@ -697,7 +697,7 @@ QgsPGRootItem::~QgsPGRootItem()
QVector<QgsDataItem*> QgsPGRootItem::createChildren()
{
QVector<QgsDataItem*> connections;
Q_FOREACH( const QString& connName, QgsPostgresConn::connectionList() )
Q_FOREACH ( const QString& connName, QgsPostgresConn::connectionList() )
{
connections << new QgsPGConnectionItem( this, connName, mPath + "/" + connName );
}
Expand Down
4 changes: 2 additions & 2 deletions src/python/qgspythonutilsimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bool QgsPythonUtilsImpl::checkSystemImports()
// locally installed plugins have priority over the system plugins
// use os.path.expanduser to support usernames with special characters (see #2512)
QStringList pluginpaths;
Q_FOREACH( QString p, extraPluginsPaths() )
Q_FOREACH ( QString p, extraPluginsPaths() )
{
if ( !QDir( p ).exists() )
{
Expand Down Expand Up @@ -111,7 +111,7 @@ bool QgsPythonUtilsImpl::checkSystemImports()
// set PyQt4 api versions
QStringList apiV2classes;
apiV2classes << "QDate" << "QDateTime" << "QString" << "QTextStream" << "QTime" << "QUrl" << "QVariant";
Q_FOREACH( const QString& clsName, apiV2classes )
Q_FOREACH ( const QString& clsName, apiV2classes )
{
if ( !runString( QString( "sip.setapi('%1', 2)" ).arg( clsName ),
QObject::tr( "Couldn't set SIP API versions." ) + "\n" + QObject::tr( "Python support will be disabled." ) ) )
Expand Down
2 changes: 0 additions & 2 deletions tests/src/core/testqgsdatasourceuri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <QtTest/QtTest>
#include <QObject>
#include <QString>
#include <QObject>
//header for class being tested
#include <qgsdatasourceuri.h>

Expand Down Expand Up @@ -134,4 +133,3 @@ void TestQgsDataSourceUri::checkparser()

QTEST_MAIN( TestQgsDataSourceUri )
#include "testqgsdatasourceuri.moc"

0 comments on commit 23ea045

Please sign in to comment.