indentation update

This commit is contained in:
Juergen E. Fischer 2015-09-12 12:22:20 +02:00
parent c3f483039d
commit 23ea045d49
6 changed files with 15 additions and 17 deletions

View File

@ -59,7 +59,7 @@ class Dissolve(GeoAlgorithm):
useField = True
except:
useField = False
countField = QgsField("count", QVariant.Int, '', 10, 0)
fields.append(countField)
writer = self.getOutputFromName(
@ -113,7 +113,7 @@ class Dissolve(GeoAlgorithm):
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]
@ -143,6 +143,6 @@ class Dissolve(GeoAlgorithm):
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')))

View File

@ -66,7 +66,7 @@ class ModelerDialog(BASE, WIDGET):
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()))
@ -210,7 +210,7 @@ class ModelerDialog(BASE, WIDGET):
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'),

View File

@ -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 );
}
@ -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 );
}
@ -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 );
}

View File

@ -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() )
@ -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" )
{
@ -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;
@ -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 );
}

View File

@ -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() )
{
@ -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." ) ) )

View File

@ -15,7 +15,6 @@
#include <QtTest/QtTest>
#include <QObject>
#include <QString>
#include <QObject>
//header for class being tested
#include <qgsdatasourceuri.h>
@ -134,4 +133,3 @@ void TestQgsDataSourceUri::checkparser()
QTEST_MAIN( TestQgsDataSourceUri )
#include "testqgsdatasourceuri.moc"