Skip to content

Commit

Permalink
indentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 17, 2014
1 parent ebd9726 commit 907ce69
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass/GrassAlgorithm.py
Expand Up @@ -82,7 +82,7 @@ def help(self):

def getParameterDescriptions(self):
descs = {}
_, helpfile = self.help()
_, helpfile = self.help()
try:
infile = open(helpfile)
lines = infile.readlines()
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -83,7 +83,7 @@ def help(self):

def getParameterDescriptions(self):
descs = {}
_, helpfile = self.help()
_, helpfile = self.help()
try:
infile = open(helpfile)
lines = infile.readlines()
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/otb/OTBAlgorithm.py
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/scripts/Fill_holes.py
Expand Up @@ -16,7 +16,7 @@
l = 0

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


resgeom = QgsGeometry()
Expand Down
Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions src/app/qgsfieldsproperties.cpp
Expand Up @@ -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 );
}
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/core/composer/qgscomposermapoverview.cpp
Expand Up @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposermapoverview.h
Expand Up @@ -96,7 +96,7 @@ class CORE_EXPORT QgsComposerMapOverview : public QObject
*/
void connectSignals();

public slots:
public slots:

void overviewExtentChanged();

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsattributeaction.cpp
Expand Up @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsfield.cpp
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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 );
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayerfeatureiterator.cpp
Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsattributeform.cpp
Expand Up @@ -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;

Expand Down Expand Up @@ -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)" )
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgscodeeditorhtml.cpp
Expand Up @@ -23,7 +23,7 @@


QgsCodeEditorHTML::QgsCodeEditorHTML( QWidget *parent )
: QgsCodeEditor( parent )
: QgsCodeEditor( parent )
{
if ( !parent )
{
Expand Down
4 changes: 2 additions & 2 deletions src/mapserver/qgsserverprojectparser.cpp
Expand Up @@ -64,8 +64,8 @@ QgsServerProjectParser::QgsServerProjectParser( QDomDocument* xmlDoc, const QStr
}

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

Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrfeatureiterator.cpp
Expand Up @@ -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 )
Expand Down
10 changes: 5 additions & 5 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -447,7 +447,7 @@ QgsOgrProvider::~QgsOgrProvider()

repack();

if( ogrDataSource )
if ( ogrDataSource )
{
OGR_DS_Destroy( ogrDataSource );
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 );

Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 907ce69

Please sign in to comment.