Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed Aug 17, 2014
1 parent ebd9726 commit 907ce693063f0925ad4eb5ae10c33f550aac96f0
@@ -82,7 +82,7 @@ def help(self):

def getParameterDescriptions(self):
descs = {}
_, helpfile = self.help()
_, helpfile = self.help()
try:
infile = open(helpfile)
lines = infile.readlines()
@@ -83,7 +83,7 @@ def help(self):

def getParameterDescriptions(self):
descs = {}
_, helpfile = self.help()
_, helpfile = self.help()
try:
infile = open(helpfile)
lines = infile.readlines()
@@ -150,7 +150,7 @@ def defineCharacteristicsFromFile(self):
if line.startswith("*Parameter"):
param = ParameterFactory.getFromString(line[1:])
param.isAdvanced = True
else:
else:
param = getParameterFromString(line)
# Hack for initializing the elevation parameters from Processing configuration
if param.name == "-elev.dem.path" or param.name == "-elev.dem" or "elev.dem" in param.name:
@@ -16,7 +16,7 @@
l = 0

writer = processing.VectorWriter(Results, None, polyPrder.fields(),
QGis.WKBMultiPolygon, polyPrder.crs())
QGis.WKBMultiPolygon, polyPrder.crs())


resgeom = QgsGeometry()
@@ -11,8 +11,8 @@
inputFields = layer.pendingFields()
fieldIdxs = []
fields = Fields.split(',')
for f in fields:
idx = inputFields.indexFromName(f)
for f in fields:
idx = inputFields.indexFromName(f)
if idx == -1:
raise GeoAlgorithmExecutionException('Field not found:' + f)
fieldIdxs.append(idx)
@@ -605,14 +605,14 @@ void QgsFieldsProperties::attributesListCellChanged( int row, int column )
QTableWidgetItem *aliasItem = mFieldsList->item( row, column );
if ( aliasItem )
{
if ( !aliasItem->text().trimmed().isEmpty() )
{
mLayer->addAttributeAlias( idx, aliasItem->text() );
}
else
{
mLayer->remAttributeAlias(idx);
}
if ( !aliasItem->text().trimmed().isEmpty() )
{
mLayer->addAttributeAlias( idx, aliasItem->text() );
}
else
{
mLayer->remAttributeAlias( idx );
}
}
}
}
@@ -218,14 +218,14 @@ void QgsComposerMapOverview::setFrameMap( const int mapId )

void QgsComposerMapOverview::connectSignals()
{
if ( mFrameMapId != -1 && mComposerMap->composition() )
if ( mFrameMapId != -1 && mComposerMap->composition() )
{
const QgsComposerMap* map = mComposerMap->composition()->getComposerMapById( mFrameMapId );
if ( map )
{
const QgsComposerMap* map = mComposerMap->composition()->getComposerMapById( mFrameMapId );
if ( map )
{
QObject::connect( map, SIGNAL( extentChanged() ), this, SLOT( overviewExtentChanged() ) );
}
QObject::connect( map, SIGNAL( extentChanged() ), this, SLOT( overviewExtentChanged() ) );
}
}
}

void QgsComposerMapOverview::setFrameSymbol( QgsFillSymbolV2 *symbol )
@@ -96,7 +96,7 @@ class CORE_EXPORT QgsComposerMapOverview : public QObject
*/
void connectSignals();

public slots:
public slots:

void overviewExtentChanged();

@@ -53,7 +53,7 @@ void QgsAttributeAction::removeAction( int index )
}
}

void QgsAttributeAction::doAction(int index, const QgsFeature& feat, int defaultValueIndex )
void QgsAttributeAction::doAction( int index, const QgsFeature& feat, int defaultValueIndex )
{
QMap<QString, QVariant> substitutionMap;
if ( defaultValueIndex >= 0 )
@@ -150,7 +150,7 @@ bool QgsFields::append( const QgsField& field, FieldOrigin origin, int originInd
return true;
}

bool QgsFields::appendExpressionField(const QgsField& field, int originIndex)
bool QgsFields::appendExpressionField( const QgsField& field, int originIndex )
{
if ( mNameToIndex.contains( field.name() ) )
return false;
@@ -2046,13 +2046,13 @@ bool QgsVectorLayer::addAttribute( const QgsField &field )
return mEditBuffer->addAttribute( field );
}

void QgsVectorLayer::remAttributeAlias( int attIndex)
void QgsVectorLayer::remAttributeAlias( int attIndex )
{
if ( attIndex < 0 || attIndex >= pendingFields().count() )
return;

QString name = pendingFields()[ attIndex ].name();
if ( mAttributeAliasMap.contains(name) )
if ( mAttributeAliasMap.contains( name ) )
{
mAttributeAliasMap.remove( name );
emit layerModified();
@@ -2895,11 +2895,11 @@ QVariant QgsVectorLayer::minimumValue( int index )
else if ( origin == QgsFields::OriginEdit || origin == QgsFields::OriginExpression )
{
// the layer is editable, but in certain cases it can still be avoided going through all features
if ( origin == QgsFields::OriginEdit &&
mEditBuffer->mDeletedFeatureIds.isEmpty() &&
mEditBuffer->mAddedFeatures.isEmpty() && !
mEditBuffer->mDeletedAttributeIds.contains( index ) &&
mEditBuffer->mChangedAttributeValues.isEmpty() )
if ( origin == QgsFields::OriginEdit &&
mEditBuffer->mDeletedFeatureIds.isEmpty() &&
mEditBuffer->mAddedFeatures.isEmpty() && !
mEditBuffer->mDeletedAttributeIds.contains( index ) &&
mEditBuffer->mChangedAttributeValues.isEmpty() )
{
return mDataProvider->minimumValue( index );
}
@@ -551,7 +551,7 @@ void QgsVectorLayerFeatureIterator::addVirtualAttributes( QgsFeature& f )
{
QMap<int, QgsExpression*>::ConstIterator it = mExpressionFieldInfo.constBegin();

for( ; it != mExpressionFieldInfo.constEnd(); ++it )
for ( ; it != mExpressionFieldInfo.constEnd(); ++it )
{
QgsExpression* exp = it.value();
QVariant val = exp->evaluate( f );
@@ -163,7 +163,7 @@ bool QgsAttributeForm::save()
QVariant srcVar = eww->value();
// need to check dstVar.isNull() != srcVar.isNull()
// otherwise if dstVar=NULL and scrVar=0, then dstVar = srcVar
if ( ( dstVar != srcVar || dstVar.isNull() != srcVar.isNull() ) && srcVar.isValid() )
if (( dstVar != srcVar || dstVar.isNull() != srcVar.isNull() ) && srcVar.isValid() )
{
dst[eww->fieldIdx()] = srcVar;

@@ -201,7 +201,7 @@ bool QgsAttributeForm::save()
int n = 0;
for ( int i = 0; i < dst.count(); ++i )
{
if ( ( dst[i] == src[i] && dst[i].isNull() == src[i].isNull() ) || !dst[i].isValid() )
if (( dst[i] == src[i] && dst[i].isNull() == src[i].isNull() ) || !dst[i].isValid() )
{
QgsDebugMsg( "equal or invalid destination" );
QgsDebugMsg( QString( "dst:'%1' (type:%2,isNull:%3,isValid:%4)" )
@@ -23,7 +23,7 @@


QgsCodeEditorHTML::QgsCodeEditorHTML( QWidget *parent )
: QgsCodeEditor( parent )
: QgsCodeEditor( parent )
{
if ( !parent )
{
@@ -64,8 +64,8 @@ QgsServerProjectParser::QgsServerProjectParser( QDomDocument* xmlDoc, const QStr
}

QgsServerProjectParser::QgsServerProjectParser()
: mXMLDoc( 0 )
, mUseLayerIDs( false )
: mXMLDoc( 0 )
, mUseLayerIDs( false )
{
}

@@ -337,7 +337,7 @@ QgsOgrFeatureSource::QgsOgrFeatureSource( const QgsOgrProvider* p )
mSubsetString = p->mSubsetString;
mEncoding = p->mEncoding; // no copying - this is a borrowed pointer from Qt
mFields = p->mAttributeFields;
mOgrGeometryTypeFilter = wkbFlatten(p->mOgrGeometryTypeFilter);
mOgrGeometryTypeFilter = wkbFlatten( p->mOgrGeometryTypeFilter );
}

QgsFeatureIterator QgsOgrFeatureSource::getFeatures( const QgsFeatureRequest& request )
@@ -447,7 +447,7 @@ QgsOgrProvider::~QgsOgrProvider()

repack();

if( ogrDataSource )
if ( ogrDataSource )
{
OGR_DS_Destroy( ogrDataSource );
}
@@ -551,7 +551,7 @@ QString QgsOgrProvider::subsetString()
QString QgsOgrProvider::ogrWkbGeometryTypeName( OGRwkbGeometryType type ) const
{
QString geom;
switch ( (int)type )
switch (( int )type )
{
case wkbUnknown: geom = "Unknown"; break;
case wkbPoint: geom = "Point"; break;
@@ -624,7 +624,7 @@ QStringList QgsOgrProvider::subLayers() const

QgsDebugMsg( QString( "id = %1 name = %2 layerGeomType = %3" ).arg( i ).arg( theLayerName ).arg( layerGeomType ) );

if ( wkbFlatten(layerGeomType) != wkbUnknown )
if ( wkbFlatten( layerGeomType ) != wkbUnknown )
{
int theLayerFeatureCount = OGR_L_GetFeatureCount( layer, 0 );

@@ -660,10 +660,10 @@ QStringList QgsOgrProvider::subLayers() const
{
fCount[wkbUnknown] = 0;
}
bool bIs25D = ( (layerGeomType & wkb25DBit) != 0 );
bool bIs25D = (( layerGeomType & wkb25DBit ) != 0 );
foreach ( OGRwkbGeometryType gType, fCount.keys() )
{
QString geom = ogrWkbGeometryTypeName( (bIs25D) ? (OGRwkbGeometryType) (gType | wkb25DBit) : gType );
QString geom = ogrWkbGeometryTypeName(( bIs25D ) ? ( OGRwkbGeometryType )( gType | wkb25DBit ) : gType );

QString sl = QString( "%1:%2:%3:%4" ).arg( i ).arg( theLayerName ).arg( fCount.value( gType ) ).arg( geom );
QgsDebugMsg( "sub layer: " + sl );

0 comments on commit 907ce69

Please sign in to comment.
You can’t perform that action at this time.