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 25, 2013
1 parent 8ea742a commit e8b9545
Show file tree
Hide file tree
Showing 27 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/layer_preview.py
Expand Up @@ -76,7 +76,7 @@ def _clear(self):
if self.item is not None:
## skip exception on RuntimeError fixes #6892
try:
self.disconnect(self.item, SIGNAL('aboutToChange'), self.setDirty)
self.disconnect(self.item, SIGNAL('aboutToChange'), self.setDirty)
except RuntimeError:
pass
self.item = None
Expand Down
Expand Up @@ -43,7 +43,7 @@ class ExampleAlgorithm(GeoAlgorithm):
a new one just with just those features of the input layer that are
selected.
It is meant to be used as an example of how to create your own
It is meant to be used as an example of how to create your own
algorithms and explain methods and variables used to do it. An algorithm
like this will be available in all elements, and there is not need
for additional work.
Expand Down
Expand Up @@ -80,7 +80,7 @@ def getIcon(self):
def _loadAlgorithms(self):
'''Here we fill the list of algorithms in self.algs.
This method is called whenever the list of algorithms should be updated.
If the list of algorithms can change
If the list of algorithms can change
(for instance, if it contains algorithms from user-defined scripts and
a new script might have been added), you should create the list again
here.
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/ProcessingToolbox.py
Expand Up @@ -63,7 +63,7 @@ def __init__(self, iface):
else:
self.modeComboBox.setCurrentIndex(1)
self.modeComboBox.currentIndexChanged.connect(self.modeHasChanged)

self.searchBox.textChanged.connect(self.fillTree)
self.algorithmTree.customContextMenuRequested.connect(self.showPopupMenu)
self.algorithmTree.doubleClicked.connect(self.executeAlgorithm)
Expand Down
6 changes: 3 additions & 3 deletions python/plugins/processing/saga/SagaAlgorithm.py
Expand Up @@ -181,7 +181,7 @@ def processAlgorithm(self, progress):
raise GeoAlgorithmExecutionException("SAGA folder is not configured.\nPlease configure it before running SAGA algorithms.")
commands = list()
self.exportedLayers = {}

self.preProcessInputs()

#1: Export rasters to sgrd and vectors to shp
Expand Down Expand Up @@ -309,7 +309,7 @@ def processAlgorithm(self, progress):
else:
commands.append("libio_gdal 1 -GRIDS \"" + filename2 + "\" -FORMAT 1 -TYPE 0 -FILE \"" + filename + "\"");


#4 Run SAGA
commands = self.editCommands(commands)
SagaUtils.createSagaBatchJobFileFromSagaCommands(commands)
Expand All @@ -332,7 +332,7 @@ def preProcessInputs(self):
if hasattr(module, 'preProcessInputs'):
func = getattr(module,'preProcessInputs')
func(self)

def editCommands(self, commands):
name = self.commandLineName()[len('saga:'):]
try:
Expand Down
Expand Up @@ -25,8 +25,8 @@

from processing.tests.TestData import table

def editCommands(commands):
def editCommands(commands):
commands[-3] = commands[-3] + " -STATS " + table()
return commands
return commands


24 changes: 12 additions & 12 deletions src/app/qgisapp.cpp
Expand Up @@ -6192,24 +6192,24 @@ void QgisApp::duplicateLayers( QList<QgsMapLayer *> lyrList )
if ( unSppType.isEmpty() && dupLayer && !dupLayer->isValid() )
{
msgBars.append( new QgsMessageBarItem(
tr( "Duplicate layer: " ),
tr( "%1 (duplication resulted in invalid layer)" ).arg( selectedLyr->name() ) ,
QgsMessageBar::WARNING,
0,
mInfoBar ) );
tr( "Duplicate layer: " ),
tr( "%1 (duplication resulted in invalid layer)" ).arg( selectedLyr->name() ) ,
QgsMessageBar::WARNING,
0,
mInfoBar ) );
continue;
}

if ( !unSppType.isEmpty() || !dupLayer )
{
msgBars.append( new QgsMessageBarItem(
tr( "Duplicate layer: " ),
tr( "%1 (%2 type unsupported)" )
.arg( selectedLyr->name() )
.arg( !unSppType.isEmpty() ? QString( "'" ) + unSppType + "' " : "" ),
QgsMessageBar::WARNING,
0,
mInfoBar ) );
tr( "Duplicate layer: " ),
tr( "%1 (%2 type unsupported)" )
.arg( selectedLyr->name() )
.arg( !unSppType.isEmpty() ? QString( "'" ) + unSppType + "' " : "" ),
QgsMessageBar::WARNING,
0,
mInfoBar ) );
continue;
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsabout.cpp
Expand Up @@ -201,8 +201,8 @@ void QgsAbout::setLicence()
#endif
if ( licenceFile.open( QIODevice::ReadOnly ) )
{
QString content = licenceFile.readAll();
txtLicense->setText(content);
QString content = licenceFile.readAll();
txtLicense->setText( content );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdfeature.cpp
Expand Up @@ -174,7 +174,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
{
//problem with coordinate transformation
QMessageBox::information( 0, tr( "Coordinate transform error" ),
tr( "Cannot transform the point to the layers coordinate system" ) );
tr( "Cannot transform the point to the layers coordinate system" ) );
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdpart.cpp
Expand Up @@ -92,7 +92,7 @@ void QgsMapToolAddPart::canvasReleaseEvent( QMouseEvent * e )
//add point to list and to rubber band
if ( e->button() == Qt::LeftButton )
{
int error = addVertex( e->pos() );
int error = addVertex( e->pos() );
if ( error == 1 )
{
QgsDebugMsg( "current layer is not a vector layer" );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmaptooladdring.cpp
Expand Up @@ -61,8 +61,8 @@ void QgsMapToolAddRing::canvasReleaseEvent( QMouseEvent * e )
{
//problem with coordinate transformation
QMessageBox::information( 0, tr( "Coordinate transform error" ),
tr( "Cannot transform the point to the layers coordinate system" ) );
return;
tr( "Cannot transform the point to the layers coordinate system" ) );
return;
}

startCapturing();
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooledit.h
Expand Up @@ -56,7 +56,7 @@ class QgsMapToolEdit: public QgsMapTool
* @param geometryType
* @param alternativeBand if true, rubber band will be set with more transparency and a dash pattern. defaut is false.
*/
QgsRubberBand* createRubberBand(QGis::GeometryType geometryType = QGis::Line , bool alternativeBand = false );
QgsRubberBand* createRubberBand( QGis::GeometryType geometryType = QGis::Line , bool alternativeBand = false );

/**Returns the current vector layer of the map canvas or 0*/
QgsVectorLayer* currentVectorLayer();
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsmaptoollabel.cpp
Expand Up @@ -67,7 +67,7 @@ void QgsMapToolLabel::createRubberBands( )
mLabelRubberBand->addPoint( QgsPoint( rect.xMaximum(), rect.yMaximum() ) );
mLabelRubberBand->addPoint( QgsPoint( rect.xMaximum(), rect.yMinimum() ) );
mLabelRubberBand->addPoint( QgsPoint( rect.xMinimum(), rect.yMinimum() ) );
mLabelRubberBand->setColor( QColor(0,255,0, 65) );
mLabelRubberBand->setColor( QColor( 0, 255, 0, 65 ) );
mLabelRubberBand->setWidth( 3 );
mLabelRubberBand->show();

Expand All @@ -82,7 +82,7 @@ void QgsMapToolLabel::createRubberBands( )
if ( geom )
{
mFeatureRubberBand = new QgsRubberBand( mCanvas, geom->type() );
mFeatureRubberBand->setColor( QColor(255, 0, 0, 65) );
mFeatureRubberBand->setColor( QColor( 255, 0, 0, 65 ) );
mFeatureRubberBand->setToGeometry( geom, vlayer );
mFeatureRubberBand->show();
}
Expand All @@ -103,7 +103,7 @@ void QgsMapToolLabel::createRubberBands( )

QgsGeometry* pointGeom = QgsGeometry::fromPoint( fixPoint );
mFixPointRubberBand = new QgsRubberBand( mCanvas, QGis::Line );
mFixPointRubberBand->setColor( QColor(0, 0, 255, 65) );
mFixPointRubberBand->setColor( QColor( 0, 0, 255, 65 ) );
mFixPointRubberBand->setToGeometry( pointGeom, vlayer );
mFixPointRubberBand->show();
delete pointGeom;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolmovefeature.cpp
Expand Up @@ -127,7 +127,7 @@ void QgsMapToolMoveFeature::canvasPressEvent( QMouseEvent * e )
}

mStartPointMapCoords = toMapCoordinates( e->pos() );
mRubberBand->setColor( QColor(255, 0, 0, 65) );
mRubberBand->setColor( QColor( 255, 0, 0, 65 ) );
mRubberBand->setWidth( 2 );
mRubberBand->show();

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolreshape.cpp
Expand Up @@ -60,7 +60,7 @@ void QgsMapToolReshape::canvasReleaseEvent( QMouseEvent * e )
{
//problem with coordinate transformation
QMessageBox::information( 0, tr( "Coordinate transform error" ),
tr( "Cannot transform the point to the layers coordinate system" ) );
tr( "Cannot transform the point to the layers coordinate system" ) );
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolrotatefeature.cpp
Expand Up @@ -169,7 +169,7 @@ void QgsMapToolRotateFeature::canvasPressEvent( QMouseEvent * e )
}
}

mRubberBand->setColor( QColor(255, 0, 0, 65) );
mRubberBand->setColor( QColor( 255, 0, 0, 65 ) );
mRubberBand->setWidth( 2 );
mRubberBand->show();

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolrotatelabel.cpp
Expand Up @@ -198,7 +198,7 @@ QgsRubberBand* QgsMapToolRotateLabel::createRotationPreviewBox()
}

mRotationPreviewBox = new QgsRubberBand( mCanvas, QGis::Line );
mRotationPreviewBox->setColor( QColor(0, 0, 255, 65));
mRotationPreviewBox->setColor( QColor( 0, 0, 255, 65 ) );
mRotationPreviewBox->setWidth( 3 );
setRotationPreviewBox( mCurrentRotation - mStartRotation );
return mRotationPreviewBox;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolsimplify.cpp
Expand Up @@ -299,7 +299,7 @@ void QgsMapToolSimplify::canvasPressEvent( QMouseEvent * e )

mRubberBand = new QgsRubberBand( mCanvas );
mRubberBand->setToGeometry( mSelectedFeature.geometry(), 0 );
mRubberBand->setColor( QColor(255, 0, 0, 65) );
mRubberBand->setColor( QColor( 255, 0, 0, 65 ) );
mRubberBand->setWidth( 2 );
mRubberBand->show();
//calculate boudaries for slidebar
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsoptions.cpp
Expand Up @@ -640,7 +640,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
myBlue = settings.value( "/qgis/digitizing/line_color_blue", 0 ).toInt();
myAlpha = settings.value( "/qgis/digitizing/line_color_alpha", 200 ).toInt();
mLineColorToolButton->setColor( QColor( myRed, myGreen, myBlue, myAlpha ) );
mLineColorToolButton->setColorDialogOptions(QColorDialog::ShowAlphaChannel);
mLineColorToolButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );

//default snap mode
mDefaultSnapModeComboBox->insertItem( 0, tr( "To vertex" ), "to vertex" );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsmaprenderer.cpp
Expand Up @@ -465,7 +465,7 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
mRenderContext.painter()->device()->height(), QImage::Format_ARGB32 );
if ( mypImage->isNull() )
{
QgsDebugMsg( "insufficient memory for image " + QString::number(mRenderContext.painter()->device()->width()) + "x" + QString::number(mRenderContext.painter()->device()->height()) );
QgsDebugMsg( "insufficient memory for image " + QString::number( mRenderContext.painter()->device()->width() ) + "x" + QString::number( mRenderContext.painter()->device()->height() ) );
emit drawError( ml );
painter->end(); // drawError is not caught by anyone, so we end painting to notify caller
return;
Expand Down Expand Up @@ -510,7 +510,7 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
mRenderContext.painter()->device()->height(), QImage::Format_ARGB32 );
if ( mypFlattenedImage->isNull() )
{
QgsDebugMsg( "insufficient memory for image " + QString::number(mRenderContext.painter()->device()->width()) + "x" + QString::number(mRenderContext.painter()->device()->height()) );
QgsDebugMsg( "insufficient memory for image " + QString::number( mRenderContext.painter()->device()->width() ) + "x" + QString::number( mRenderContext.painter()->device()->height() ) );
emit drawError( ml );
painter->end(); // drawError is not caught by anyone, so we end painting to notify caller
return;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgspallabeling.cpp
Expand Up @@ -3858,7 +3858,7 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
}

//layer names
QString layerName = QString::fromUtf8( ( *it )->getLayerName() );
QString layerName = QString::fromUtf8(( *it )->getLayerName() );
if ( palGeometry->isDiagram() )
{
//render diagram
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsattributedialog.cpp
Expand Up @@ -552,8 +552,8 @@ void QgsAttributeDialog::dialogDestroyed()

if ( !mReturnvarname.isEmpty() )
{
QString expr = QString( "if locals().has_key('%1'): del %1\n" ).arg( mReturnvarname );
QgsPythonRunner::run( expr );
QString expr = QString( "if locals().has_key('%1'): del %1\n" ).arg( mReturnvarname );
QgsPythonRunner::run( expr );
}

mDialog = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmessagebaritem.cpp
Expand Up @@ -36,7 +36,7 @@ QgsMessageBarItem::QgsMessageBarItem( const QString &text, QgsMessageBar::Messag
writeContent();
}

QgsMessageBarItem::QgsMessageBarItem(const QString &title, const QString &text, QgsMessageBar::MessageLevel level, int duration , QWidget *parent ) :
QgsMessageBarItem::QgsMessageBarItem( const QString &title, const QString &text, QgsMessageBar::MessageLevel level, int duration , QWidget *parent ) :
QWidget( parent )
, mTitle( title )
, mText( text )
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/roadgraph/shortestpathwidget.cpp
Expand Up @@ -153,11 +153,11 @@ RgShortestPathWidget::RgShortestPathWidget( QWidget* theParent, RoadGraphPlugin
connect( mClear, SIGNAL( clicked( bool ) ), this, SLOT( clear() ) );

mrbFrontPoint = new QgsRubberBand( mPlugin->iface()->mapCanvas(), QGis::Polygon );
mrbFrontPoint->setColor( QColor(0, 255, 0, 65) );
mrbFrontPoint->setColor( QColor( 0, 255, 0, 65 ) );
mrbFrontPoint->setWidth( 2 );

mrbBackPoint = new QgsRubberBand( mPlugin->iface()->mapCanvas(), QGis::Polygon );
mrbBackPoint->setColor( QColor(255, 0, 0, 65) );
mrbBackPoint->setColor( QColor( 255, 0, 0, 65 ) );
mrbBackPoint->setWidth( 2 );

mrbPath = new QgsRubberBand( mPlugin->iface()->mapCanvas(), QGis::Line );
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/topology/checkDock.cpp
Expand Up @@ -71,9 +71,9 @@ checkDock::checkDock( QgisInterface* qIface, QWidget* parent )
mRBFeature2 = new QgsRubberBand( canvas );
mRBConflict = new QgsRubberBand( canvas );

mRBFeature1->setColor( QColor(0, 0, 255, 65) );
mRBFeature2->setColor( QColor(0, 255, 0, 65) );
mRBConflict->setColor( QColor(255, 0, 0, 65) );
mRBFeature1->setColor( QColor( 0, 0, 255, 65 ) );
mRBFeature2->setColor( QColor( 0, 255, 0, 65 ) );
mRBConflict->setColor( QColor( 255, 0, 0, 65 ) );

mRBFeature1->setWidth( 5 );
mRBFeature2->setWidth( 5 );
Expand Down
10 changes: 5 additions & 5 deletions src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
Expand Up @@ -870,7 +870,7 @@ QgsFeatureIterator QgsDelimitedTextProvider::getFeatures( const QgsFeatureReques
{
// If the file has become invalid, rescan to check that it is still invalid.
//
if ( (mLayerValid && ! mValid) || mRescanRequired ) rescanFile();
if (( mLayerValid && ! mValid ) || mRescanRequired ) rescanFile();

return QgsFeatureIterator( new QgsDelimitedTextFeatureIterator( this, request ) );
}
Expand Down Expand Up @@ -1055,7 +1055,7 @@ void QgsDelimitedTextProvider::setUriParameter( QString parameter, QString value

void QgsDelimitedTextProvider::onFileUpdated()
{
if( ! mRescanRequired )
if ( ! mRescanRequired )
{
QStringList messages;
messages.append( tr( "The file has been updated by another application - reloading" ) );
Expand Down Expand Up @@ -1091,7 +1091,7 @@ bool QgsDelimitedTextProvider::nextFeature( QgsFeature& feature, QgsDelimitedTex
// feature.

feature.setValid( false );
if( ! mValid ) break;
if ( ! mValid ) break;

QgsDelimitedTextFile::Status status = file->nextRecord( tokens );
if ( status == QgsDelimitedTextFile::RecordEOF ) break;
Expand Down Expand Up @@ -1261,7 +1261,7 @@ void QgsDelimitedTextProvider::fetchAttribute( QgsFeature& feature, int fieldIdx
// Return the extent of the layer
QgsRectangle QgsDelimitedTextProvider::extent()
{
if( mRescanRequired ) rescanFile();
if ( mRescanRequired ) rescanFile();
return mExtent;
}

Expand All @@ -1278,7 +1278,7 @@ QGis::WkbType QgsDelimitedTextProvider::geometryType() const
*/
long QgsDelimitedTextProvider::featureCount() const
{
if( mRescanRequired ) const_cast<QgsDelimitedTextProvider *>(this)->rescanFile();
if ( mRescanRequired ) const_cast<QgsDelimitedTextProvider *>( this )->rescanFile();
return mNumberFeatures;
}

Expand Down
2 changes: 1 addition & 1 deletion src/providers/grass/qgsgrass.cpp
Expand Up @@ -144,7 +144,7 @@ void GRASS_LIB_EXPORT QgsGrass::init( void )
QgsDebugMsg( QString( "GRASS gisBase = %1" ).arg( gisBase ) );
#elif defined(Q_OS_MACX)
// check for bundled GRASS, fall back to configured path
gisBase = QCoreApplication::applicationDirPath().append("/grass") ;
gisBase = QCoreApplication::applicationDirPath().append( "/grass" ) ;
if ( !isValidGrassBaseDir( gisBase ) )
{
gisBase = GRASS_BASE;
Expand Down

0 comments on commit e8b9545

Please sign in to comment.