Skip to content

Commit

Permalink
indentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 27, 2013
1 parent 8cf9f7b commit ebc8e6c
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 35 deletions.
4 changes: 1 addition & 3 deletions python/plugins/db_manager/dlg_sql_window.py
Expand Up @@ -81,8 +81,6 @@ def __init__(self, iface, db, parent=None):
def showEvent(self, event):
QDialog.showEvent(self, event)
self.updatePresetsCombobox()



def updatePresetsCombobox(self):
entries = QgsProject.instance().subkeyList('DBManager','savedQueries')
Expand All @@ -108,7 +106,7 @@ def storePreset(self):
self.presetCombo.setCurrentIndex(self.presetCombo.count()-1)
else:
self.presetCombo.setCurrentIndex(index)

def deletePreset(self):
name = self.presetCombo.currentText()
QgsProject.instance().removeEntry('DBManager','savedQueries/q'+str(name.__hash__()) )
Expand Down
1 change: 1 addition & 0 deletions scripts/spelling.dat
Expand Up @@ -465,3 +465,4 @@ specifed:specified
widht:width
heigth:height
heigh:height
delimted:delimited
8 changes: 4 additions & 4 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -1985,12 +1985,12 @@ bool QgsLegend::readXML( QDomNode& legendnode )

mUpdateDrawingOrder = true;

if( !readXML( 0, legendnode ) )
if ( !readXML( 0, legendnode ) )
return false;

if( legendnode.toElement().attribute( "updateDrawingOrder", "true" ) != "true" )
if ( legendnode.toElement().attribute( "updateDrawingOrder", "true" ) != "true" )
{
if( !verifyDrawingOrder() )
if ( !verifyDrawingOrder() )
QgsMessageLog::logMessage( tr( "Not fully defined drawing order set to legend order." ), tr( "Legend" ), QgsMessageLog::WARNING );

mUpdateDrawingOrder = false;
Expand Down Expand Up @@ -2985,7 +2985,7 @@ bool QgsLegend::verifyDrawingOrder()
hasUndefinedOrder |= ll && ll->drawingOrder() < 0;
}

if( !hasUndefinedOrder )
if ( !hasUndefinedOrder )
return true;

int i = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -5281,7 +5281,7 @@ void QgisApp::deselectAll()
void QgisApp::selectByExpression()
{
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( mMapCanvas->currentLayer() );
if( !vlayer )
if ( !vlayer )
{
messageBar()->pushMessage(
tr( "No active vector layer" ),
Expand Down
2 changes: 0 additions & 2 deletions src/core/CMakeLists.txt
@@ -1,5 +1,3 @@


#############################################################
# sources

Expand Down
16 changes: 8 additions & 8 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -51,7 +51,7 @@ extern "C"

QgsOfflineEditing::QgsOfflineEditing()
{
connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWasAdded( QgsMapLayer* ) ), this, SLOT( layerAdded( QgsMapLayer* ) ) );
connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWasAdded( QgsMapLayer* ) ), this, SLOT( layerAdded( QgsMapLayer* ) ) );
}

QgsOfflineEditing::~QgsOfflineEditing()
Expand Down Expand Up @@ -524,7 +524,7 @@ void QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlite3* db, con
// fill gap in QgsAttributeMap if geometry column is not last (WORKAROUND)
int column = 0;
QgsAttributes attrs = f.attributes();
QgsAttributes newAttrs(attrs.count());
QgsAttributes newAttrs( attrs.count() );
for ( int it = 0; it < attrs.count(); ++it )
{
newAttrs[column++] = attrs[it];
Expand Down Expand Up @@ -555,7 +555,7 @@ void QgsOfflineEditing::copyVectorLayer( QgsVectorLayer* layer, sqlite3* db, con
int remoteCount = remoteFeatureIds.size();
for ( int i = 0; i < remoteCount; i++ )
{
addFidLookup( db, layerId, offlineFeatureIds.at( i ), remoteFeatureIds.at( remoteCount - (i+1) ) );
addFidLookup( db, layerId, offlineFeatureIds.at( i ), remoteFeatureIds.at( remoteCount - ( i + 1 ) ) );
emit progressUpdated( featureCount++ );
}
sqlExec( db, "COMMIT" );
Expand Down Expand Up @@ -1208,15 +1208,15 @@ void QgsOfflineEditing::stopListenFeatureChanges()
QgsVectorLayer* vLayer = qobject_cast<QgsVectorLayer *>( sender() );
// disable logging
disconnect( vLayer->editBuffer(), SIGNAL( committedAttributesAdded( const QString&, const QList<QgsField>& ) ),
this, SLOT( committedAttributesAdded( const QString&, const QList<QgsField>& ) ) );
this, SLOT( committedAttributesAdded( const QString&, const QList<QgsField>& ) ) );
disconnect( vLayer, SIGNAL( committedFeaturesAdded( const QString&, const QgsFeatureList& ) ),
this, SLOT( committedFeaturesAdded( const QString&, const QgsFeatureList& ) ) );
this, SLOT( committedFeaturesAdded( const QString&, const QgsFeatureList& ) ) );
disconnect( vLayer, SIGNAL( committedFeaturesRemoved( const QString&, const QgsFeatureIds& ) ),
this, SLOT( committedFeaturesRemoved( const QString&, const QgsFeatureIds& ) ) );
this, SLOT( committedFeaturesRemoved( const QString&, const QgsFeatureIds& ) ) );
disconnect( vLayer->editBuffer(), SIGNAL( committedAttributeValuesChanges( const QString&, const QgsChangedAttributesMap& ) ),
this, SLOT( committedAttributeValuesChanges( const QString&, const QgsChangedAttributesMap& ) ) );
this, SLOT( committedAttributeValuesChanges( const QString&, const QgsChangedAttributesMap& ) ) );
disconnect( vLayer->editBuffer(), SIGNAL( committedGeometriesChanges( const QString&, const QgsGeometryMap& ) ),
this, SLOT( committedGeometriesChanges( const QString&, const QgsGeometryMap& ) ) );
this, SLOT( committedGeometriesChanges( const QString&, const QgsGeometryMap& ) ) );
}

void QgsOfflineEditing::layerAdded( QgsMapLayer* layer )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgspallabeling.cpp
Expand Up @@ -1406,7 +1406,7 @@ void QgsPalLayerSettings::calculateLabelSize( const QFontMetricsF* fm, QString t

if ( wrapchr.isEmpty() )
{
wrapchr = QString( "\n" ); // default to new line delimeter
wrapchr = QString( "\n" ); // default to new line delimiter
}

//consider the space needed for the direction symbol
Expand Down
20 changes: 10 additions & 10 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -814,19 +814,19 @@ void QgsVectorLayer::invertSelection()

void QgsVectorLayer::selectAll()
{
QgsFeatureIterator fit = getFeatures( QgsFeatureRequest()
.setFlags( QgsFeatureRequest::NoGeometry )
.setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fit = getFeatures( QgsFeatureRequest()
.setFlags( QgsFeatureRequest::NoGeometry )
.setSubsetOfAttributes( QgsAttributeList() ) );

QgsFeatureIds ids;
QgsFeatureIds ids;

QgsFeature fet;
while ( fit.nextFeature( fet ) )
{
ids << fet.id();
}
QgsFeature fet;
while ( fit.nextFeature( fet ) )
{
ids << fet.id();
}

setSelectedFeatures( ids );
setSelectedFeatures( ids );
}

void QgsVectorLayer::invertSelectionInRectangle( QgsRectangle & rect )
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterprojector.cpp
Expand Up @@ -262,7 +262,7 @@ void QgsRasterProjector::calcSrcExtent()
// align extent to src resolution to avoid jumping of reprojected pixels
// when shifting resampled grid.
// Important especially if we are over mMaxSrcXRes, mMaxSrcYRes limits
// Note however, that preceeding filters (like resampler) may read data
// Note however, that preceding filters (like resampler) may read data
// on different resolution.

QgsDebugMsg( "mSrcExtent = " + mSrcExtent.toString() );
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsexpressionbuilderwidget.cpp
Expand Up @@ -58,9 +58,9 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
registerItem( "Operators", "-", " -" , tr( "Subtraction operator" ) );
registerItem( "Operators", "*", " * ", tr( "Multiplication operator" ) );
registerItem( "Operators", "/", " / ", tr( "Division operator" ) );
registerItem( "Operators", "%", " % ", tr( "Modulo operator" ) );
registerItem( "Operators", "%", " % ", tr( "Modulo operator" ) );
registerItem( "Operators", "^", " ^ ", tr( "Power operator" ) );
registerItem( "Operators", "=", " = ", tr( "Equal operator" ) );
registerItem( "Operators", "=", " = ", tr( "Equal operator" ) );
registerItem( "Operators", ">", " > ", tr( "Greater as operator" ) );
registerItem( "Operators", "<", " < ", tr( "Less than operator" ) );
registerItem( "Operators", "<>", " <> ", tr( "Unequal operator" ) );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
Expand Up @@ -544,7 +544,7 @@ void QgsSingleBandPseudoColorRendererWidget::on_mColormapTreeWidget_itemDoubleCl
if ( column == 1 ) //change item color
{
item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
QColor newColor = QColorDialog::getColor( item->background( column ).color(), this, "Change color", QColorDialog::ShowAlphaChannel );
QColor newColor = QColorDialog::getColor( item->background( column ).color(), this, "Change color", QColorDialog::ShowAlphaChannel );
if ( newColor.isValid() )
{
item->setBackground( 1, QBrush( newColor ) );
Expand Down
2 changes: 1 addition & 1 deletion src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
Expand Up @@ -1222,7 +1222,7 @@ void QgsDelimitedTextProvider::fetchAttribute( QgsFeature& feature, int fieldIdx
}
else
{
dvalue = QString(value).replace( mDecimalPoint, "." ).toDouble( &ok );
dvalue = QString( value ).replace( mDecimalPoint, "." ).toDouble( &ok );
}
}
if ( ok )
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsdelimitedtextprovider.py
Expand Up @@ -169,7 +169,7 @@ def delimitedTextData( testname, filename, requests, verbose, **params ):
r( layer )
continue
rfields,rtypes, rdata = layerData(layer,r,nr*1000)
if len(rfields) > len(fields):
if len(rfields) > len(fields):
fields = rfields
fieldTypes=rtypes
data.update(rdata)
Expand Down

0 comments on commit ebc8e6c

Please sign in to comment.