diff --git a/python/plugins/db_manager/dlg_sql_window.py b/python/plugins/db_manager/dlg_sql_window.py index e6211b90a59f..1413ed14d8fb 100644 --- a/python/plugins/db_manager/dlg_sql_window.py +++ b/python/plugins/db_manager/dlg_sql_window.py @@ -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') @@ -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__()) ) diff --git a/scripts/spelling.dat b/scripts/spelling.dat index f24ced14df87..933e172c2666 100644 --- a/scripts/spelling.dat +++ b/scripts/spelling.dat @@ -465,3 +465,4 @@ specifed:specified widht:width heigth:height heigh:height +delimted:delimited diff --git a/src/app/legend/qgslegend.cpp b/src/app/legend/qgslegend.cpp index 1c67986e68c6..4e4adbd431ea 100644 --- a/src/app/legend/qgslegend.cpp +++ b/src/app/legend/qgslegend.cpp @@ -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; @@ -2985,7 +2985,7 @@ bool QgsLegend::verifyDrawingOrder() hasUndefinedOrder |= ll && ll->drawingOrder() < 0; } - if( !hasUndefinedOrder ) + if ( !hasUndefinedOrder ) return true; int i = 0; diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 52efb02c3bd8..b519b1ceabb5 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -5281,7 +5281,7 @@ void QgisApp::deselectAll() void QgisApp::selectByExpression() { QgsVectorLayer *vlayer = qobject_cast( mMapCanvas->currentLayer() ); - if( !vlayer ) + if ( !vlayer ) { messageBar()->pushMessage( tr( "No active vector layer" ), diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index d469393f74e8..cf8bd0f3a669 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,5 +1,3 @@ - - ############################################################# # sources diff --git a/src/core/qgsofflineediting.cpp b/src/core/qgsofflineediting.cpp index abae0ff2bd6d..68bdf4304f97 100644 --- a/src/core/qgsofflineediting.cpp +++ b/src/core/qgsofflineediting.cpp @@ -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() @@ -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]; @@ -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" ); @@ -1208,15 +1208,15 @@ void QgsOfflineEditing::stopListenFeatureChanges() QgsVectorLayer* vLayer = qobject_cast( sender() ); // disable logging disconnect( vLayer->editBuffer(), SIGNAL( committedAttributesAdded( const QString&, const QList& ) ), - this, SLOT( committedAttributesAdded( const QString&, const QList& ) ) ); + this, SLOT( committedAttributesAdded( const QString&, const QList& ) ) ); 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 ) diff --git a/src/core/qgspallabeling.cpp b/src/core/qgspallabeling.cpp index 58f254ce5e25..0824a9250486 100644 --- a/src/core/qgspallabeling.cpp +++ b/src/core/qgspallabeling.cpp @@ -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 diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index f9c6bbaaaf2b..ec3b288ea996 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -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 ) diff --git a/src/core/raster/qgsrasterprojector.cpp b/src/core/raster/qgsrasterprojector.cpp index 5a2195e03af3..1f3214921baf 100644 --- a/src/core/raster/qgsrasterprojector.cpp +++ b/src/core/raster/qgsrasterprojector.cpp @@ -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() ); diff --git a/src/gui/qgsexpressionbuilderwidget.cpp b/src/gui/qgsexpressionbuilderwidget.cpp index dd55bf316581..fb27c7467414 100644 --- a/src/gui/qgsexpressionbuilderwidget.cpp +++ b/src/gui/qgsexpressionbuilderwidget.cpp @@ -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" ) ); diff --git a/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp b/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp index 50045aa19c9b..b7be2e6a8817 100644 --- a/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp +++ b/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp @@ -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 ) ); diff --git a/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp b/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp index 35b34f2b909e..781cdb5fdf04 100644 --- a/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp +++ b/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp @@ -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 ) diff --git a/tests/src/python/test_qgsdelimitedtextprovider.py b/tests/src/python/test_qgsdelimitedtextprovider.py index f3d41c25e2cf..d30ae85a493c 100644 --- a/tests/src/python/test_qgsdelimitedtextprovider.py +++ b/tests/src/python/test_qgsdelimitedtextprovider.py @@ -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)