diff --git a/python/plugins/sextante/algs/PointsLayerFromTable.py b/python/plugins/sextante/algs/PointsLayerFromTable.py
index c06594c5dc3..6b52b326479 100644
--- a/python/plugins/sextante/algs/PointsLayerFromTable.py
+++ b/python/plugins/sextante/algs/PointsLayerFromTable.py
@@ -50,7 +50,7 @@ class PointsLayerFromTable(GeoAlgorithm):
writer = output.getVectorWriter(fields, QGis.WKBPoint, self.crs)
xfieldindex = vlayer.fieldNameIndex(self.getParameterValue(self.XFIELD))
yfieldindex = vlayer.fieldNameIndex(self.getParameterValue(self.YFIELD))
-
+
crsId = self.getParameterValue(self.TARGET_CRS)
targetCrs = QgsCoordinateReferenceSystem(crsId)
self.crs = targetCrs
diff --git a/python/plugins/sextante/core/AlgorithmProvider.py b/python/plugins/sextante/core/AlgorithmProvider.py
index 99409c6686d..ca08e371a00 100644
--- a/python/plugins/sextante/core/AlgorithmProvider.py
+++ b/python/plugins/sextante/core/AlgorithmProvider.py
@@ -83,7 +83,7 @@ class AlgorithmProvider():
def getDescription(self):
'''Returns the full name of the provider'''
- return "Generic algorithm provider"
+ return "Generic algorithm provider"
def getIcon(self):
return QtGui.QIcon(os.path.dirname(__file__) + "/../images/alg.png")
diff --git a/python/plugins/sextante/core/GeoAlgorithm.py b/python/plugins/sextante/core/GeoAlgorithm.py
index dbcda8d91ea..a233d3345e7 100644
--- a/python/plugins/sextante/core/GeoAlgorithm.py
+++ b/python/plugins/sextante/core/GeoAlgorithm.py
@@ -408,7 +408,7 @@ class GeoAlgorithm:
s+=out.getValueAsCommandLineParameter() + ","
s= s[:-1] + ")"
return s
-
+
def getPostProcessingErrorMessage(self, wrongLayers):
'''Returns the message to be shown to the user when, after running this algorithm,
there is a problem loading the resulting layer.
diff --git a/python/plugins/sextante/gui/SextanteToolbox.py b/python/plugins/sextante/gui/SextanteToolbox.py
index 9d6a246728f..f398fdf579a 100644
--- a/python/plugins/sextante/gui/SextanteToolbox.py
+++ b/python/plugins/sextante/gui/SextanteToolbox.py
@@ -220,8 +220,8 @@ class SextanteToolbox(QDockWidget, Ui_SextanteToolbox):
for alg in algs:
if not alg.showInToolbox:
continue
- altgroup, altsubgroup, altname = AlgorithmDecorator.getGroupsAndName(alg)
- if altgroup is None:
+ altgroup, altsubgroup, altname = AlgorithmDecorator.getGroupsAndName(alg)
+ if altgroup is None:
continue
if text =="" or text.lower() in altname.lower():
if altgroup not in groups:
diff --git a/python/plugins/sextante/r/RAlgorithm.py b/python/plugins/sextante/r/RAlgorithm.py
index aad6472ac6b..0fce40ac281 100644
--- a/python/plugins/sextante/r/RAlgorithm.py
+++ b/python/plugins/sextante/r/RAlgorithm.py
@@ -270,17 +270,17 @@ class RAlgorithm(GeoAlgorithm):
def getImportCommands(self):
commands = []
-
+
# just use main mirror
commands.append('options("repos"="http://cran.at.r-project.org/")')
-
+
# try to install packages if needed
packages = RUtils.getRequiredPackages(self.script)
packages.extend(['rgdal', 'raster'])
- for p in packages:
+ for p in packages:
commands.append(
- 'tryCatch(find.package("' + p +
- '"), error=function(e) install.packages("' + p +'", dependencies=TRUE))')
+ 'tryCatch(find.package("' + p +
+ '"), error=function(e) install.packages("' + p +'", dependencies=TRUE))')
commands.append('library("raster")')
commands.append('library("rgdal")')
@@ -401,7 +401,7 @@ class RAlgorithm(GeoAlgorithm):
html += "
The script you have executed needs the following packages:
"
packages = RUtils.getRequiredPackages(self.script)
for p in packages:
- html += '- ' + p + '
'
+ html += '- ' + p + '
'
html += "
Make sure they are installed in your R environment before trying to execute this script.
"
else:
html += msg + ""
diff --git a/python/plugins/sextante/r/RUtils.py b/python/plugins/sextante/r/RUtils.py
index 0807b8e239d..25f16a17260 100644
--- a/python/plugins/sextante/r/RUtils.py
+++ b/python/plugins/sextante/r/RUtils.py
@@ -125,7 +125,7 @@ class RUtils:
s+="\n"
return s
-
+
@staticmethod
def checkRIsInstalled(ignoreRegistrySettings=False):
if SextanteUtils.isWindows():
@@ -157,9 +157,8 @@ class RUtils:
'Click here'
'to know more about how to install and configure R to be used with SEXTANTE
')
return html
-
+
@staticmethod
def getRequiredPackages(code):
regex = re.compile('library\("?(.*?)"?\)')
return regex.findall(code)
-
\ No newline at end of file
diff --git a/python/plugins/sextante/saga/SagaAlgorithm.py b/python/plugins/sextante/saga/SagaAlgorithm.py
index 793be229e16..b69c41792ca 100644
--- a/python/plugins/sextante/saga/SagaAlgorithm.py
+++ b/python/plugins/sextante/saga/SagaAlgorithm.py
@@ -374,7 +374,7 @@ class SagaAlgorithm(GeoAlgorithm):
layer = QGisLayers.getObjectFromUri(value)
if layer is not None and layer.bandCount() > 1:
return ("Input layer " + str(layer.name()) + " has more than one band.\n"
- + "Multiband layers are not supported by SAGA")
+ + "Multiband layers are not supported by SAGA")
def helpFile(self):
return os.path.join(os.path.dirname(__file__), "help", self.name.replace(" ", "") + ".html")
diff --git a/python/plugins/sextante/saga/SagaAlgorithmProvider.py b/python/plugins/sextante/saga/SagaAlgorithmProvider.py
index 336fd9f434a..64476d3fcbc 100644
--- a/python/plugins/sextante/saga/SagaAlgorithmProvider.py
+++ b/python/plugins/sextante/saga/SagaAlgorithmProvider.py
@@ -83,7 +83,7 @@ class SagaAlgorithmProvider(AlgorithmProvider):
alg = SagaAlgorithm(os.path.join(folder, descriptionFile))
if alg.name.strip() != "":
self.preloadedAlgs.append(alg)
- else:
+ else:
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile)
except Exception,e:
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile +"\n" + str(e))
diff --git a/src/app/qgsattributetabledialog.cpp b/src/app/qgsattributetabledialog.cpp
index 867f639fbec..b09e61948e0 100644
--- a/src/app/qgsattributetabledialog.cpp
+++ b/src/app/qgsattributetabledialog.cpp
@@ -570,8 +570,8 @@ void QgsAttributeTableDialog::filterQueryAccepted()
{
if ( mFilterQuery->text().isEmpty() )
{
- filterShowAll();
- return;
+ filterShowAll();
+ return;
}
filterQueryChanged( mFilterQuery->text() );
}
diff --git a/src/core/composer/qgscomposeritemgroup.cpp b/src/core/composer/qgscomposeritemgroup.cpp
index 65c65407e0a..38e9bb051bd 100644
--- a/src/core/composer/qgscomposeritemgroup.cpp
+++ b/src/core/composer/qgscomposeritemgroup.cpp
@@ -22,7 +22,7 @@
#include
QgsComposerItemGroup::QgsComposerItemGroup( QgsComposition* c )
- : QgsComposerItem( c )
+ : QgsComposerItem( c )
{
setZValue( 90 );
show();
diff --git a/src/core/qgsmimedatautils.cpp b/src/core/qgsmimedatautils.cpp
index a0d851be121..054101a76cd 100644
--- a/src/core/qgsmimedatautils.cpp
+++ b/src/core/qgsmimedatautils.cpp
@@ -46,26 +46,26 @@ QgsMimeDataUtils::Uri::Uri( QString& encData )
QChar escape = '\\';
QString part;
bool inEscape = false;
- for (int i = 0; i < encData.length(); ++i)
- {
- if (encData.at(i) == escape && !inEscape)
- {
- inEscape = true;
- }
- else if (encData.at(i) == split && !inEscape)
- {
- parts << part;
- part = "";
- }
- else
- {
- part += encData.at(i);
- inEscape = false;
- }
- }
- if (!part.isEmpty())
+ for ( int i = 0; i < encData.length(); ++i )
{
+ if ( encData.at( i ) == escape && !inEscape )
+ {
+ inEscape = true;
+ }
+ else if ( encData.at( i ) == split && !inEscape )
+ {
parts << part;
+ part = "";
+ }
+ else
+ {
+ part += encData.at( i );
+ inEscape = false;
+ }
+ }
+ if ( !part.isEmpty() )
+ {
+ parts << part;
}
if ( parts.size() == 4 )
@@ -80,11 +80,11 @@ QgsMimeDataUtils::Uri::Uri( QString& encData )
QString QgsMimeDataUtils::Uri::data() const
{
- QString escapedName = name;
- QString escapeUri = uri;
- escapedName.replace(":", "\\:");
- escapeUri.replace(":", "\\:");
- return layerType + ":" + providerKey + ":" + escapedName + ":" + escapeUri;
+ QString escapedName = name;
+ QString escapeUri = uri;
+ escapedName.replace( ":", "\\:" );
+ escapeUri.replace( ":", "\\:" );
+ return layerType + ":" + providerKey + ":" + escapedName + ":" + escapeUri;
}
// -----
diff --git a/src/core/qgsprojectfiletransform.cpp b/src/core/qgsprojectfiletransform.cpp
index 493b3da95cc..9fcbd354a69 100644
--- a/src/core/qgsprojectfiletransform.cpp
+++ b/src/core/qgsprojectfiletransform.cpp
@@ -820,7 +820,7 @@ int QgsProjectFileTransform::rasterBandNumber( const QDomElement& rasterProperti
if ( re.indexIn( rasterBandElem.text() ) >= 0 )
{
- return re.cap(1).toInt();
+ return re.cap( 1 ).toInt();
}
}
return band;
diff --git a/src/core/qgsvectorlayereditbuffer.cpp b/src/core/qgsvectorlayereditbuffer.cpp
index 07642b1cf94..8d3a1af6f97 100644
--- a/src/core/qgsvectorlayereditbuffer.cpp
+++ b/src/core/qgsvectorlayereditbuffer.cpp
@@ -267,7 +267,7 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
commitErrors << tr( "ERROR: %n attribute(s) not deleted.", "not deleted attributes count", mDeletedAttributeIds.size() );
#if 0
QString list = "ERROR: Pending attribute deletes:";
- foreach( int idx, mDeletedAttributeIds )
+ foreach ( int idx, mDeletedAttributeIds )
{
list.append( " " + L->pendingFields()[idx].name() );
}
@@ -296,7 +296,7 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
commitErrors << tr( "ERROR: %n new attribute(s) not added", "not added attributes count", mAddedAttributes.size() );
#if 0
QString list = "ERROR: Pending adds:";
- foreach( QgsField f, mAddedAttributes )
+ foreach ( QgsField f, mAddedAttributes )
{
list.append( " " + f.name() );
}
@@ -353,14 +353,14 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
commitErrors << tr( "ERROR: %n attribute value change(s) not applied.", "not changed attribute values count", mChangedAttributeValues.size() );
#if 0
QString list = "ERROR: pending changes:";
- foreach( QgsFeatureId id, mChangedAttributeValues.keys() )
+ foreach ( QgsFeatureId id, mChangedAttributeValues.keys() )
{
- list.append( "\n " + FID_TO_STRING( id ) + "[" );
- foreach( int idx, mChangedAttributeValues[ id ].keys() )
+ list.append( "\n " + FID_TO_STRING( id ) + "[" );
+ foreach ( int idx, mChangedAttributeValues[ id ].keys() )
{
list.append( QString( " %1:%2" ).arg( L->pendingFields()[idx].name() ).arg( mChangedAttributeValues[id][idx].toString() ) );
}
- list.append( " ]" );
+ list.append( " ]" );
}
commitErrors << list;
#endif
@@ -392,9 +392,9 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
commitErrors << tr( "ERROR: %n feature(s) not deleted.", "not deleted features count", mDeletedFeatureIds.size() );
#if 0
QString list = "ERROR: pending deletes:";
- foreach( QgsFeatureId id, mDeletedFeatureIds )
+ foreach ( QgsFeatureId id, mDeletedFeatureIds )
{
- list.append( " " + FID_TO_STRING( id ) );
+ list.append( " " + FID_TO_STRING( id ) );
}
commitErrors << list;
#endif
@@ -440,17 +440,17 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
{
commitErrors << tr( "ERROR: %n feature(s) not added.", "not added features count", mAddedFeatures.size() );
#if 0
- QString list = "ERROR: pending adds:";
- foreach( QgsFeature f, mAddedFeatures )
- {
- list.append( " " + FID_TO_STRING( f.id() ) + "[" );
- for( int i = 0; i < L->pendingFields().size(); i++ )
- {
- list.append( QString( " %1:%2" ).arg( L->pendingFields()[i].name() ).arg( f.attributes()[i].toString() ) );
- }
- list.append( " ]" );
- }
- commitErrors << list;
+ QString list = "ERROR: pending adds:";
+ foreach ( QgsFeature f, mAddedFeatures )
+ {
+ list.append( " " + FID_TO_STRING( f.id() ) + "[" );
+ for ( int i = 0; i < L->pendingFields().size(); i++ )
+ {
+ list.append( QString( " %1:%2" ).arg( L->pendingFields()[i].name() ).arg( f.attributes()[i].toString() ) );
+ }
+ list.append( " ]" );
+ }
+ commitErrors << list;
#endif
success = false;
}
diff --git a/src/mapserver/qgis_map_serv.cpp b/src/mapserver/qgis_map_serv.cpp
index 9740a1f90fb..3109ef7df40 100644
--- a/src/mapserver/qgis_map_serv.cpp
+++ b/src/mapserver/qgis_map_serv.cpp
@@ -604,7 +604,7 @@ int main( int argc, char * argv[] )
}
else if ( request.compare( "GetLegendGraphic", Qt::CaseInsensitive ) == 0 ||
request.compare( "GetLegendGraphics", Qt::CaseInsensitive ) == 0 )
- // GetLegendGraphics for compatibility with earlier QGIS versions
+ // GetLegendGraphics for compatibility with earlier QGIS versions
{
QImage* result = 0;
try
diff --git a/src/providers/spatialite/qgsspatialiteprovider.cpp b/src/providers/spatialite/qgsspatialiteprovider.cpp
index 260d7b2374b..1769bd1a915 100644
--- a/src/providers/spatialite/qgsspatialiteprovider.cpp
+++ b/src/providers/spatialite/qgsspatialiteprovider.cpp
@@ -649,9 +649,9 @@ void QgsSpatiaLiteProvider::loadFieldsAbstractInterface( gaiaVectorLayerPtr lyr
QString name = QString::fromUtf8( results[( i * columns ) + 1] );
QString pk = results[( i * columns ) + 5];
if ( pk.toInt() == 0 )
- continue;
+ continue;
- if( mPrimaryKey.isEmpty() )
+ if ( mPrimaryKey.isEmpty() )
mPrimaryKey = name;
mPrimaryKeyAttrs << i - 1;
}
diff --git a/tests/src/gui/testqgsrubberband.cpp b/tests/src/gui/testqgsrubberband.cpp
index fbdb1f36145..269833fdde0 100644
--- a/tests/src/gui/testqgsrubberband.cpp
+++ b/tests/src/gui/testqgsrubberband.cpp
@@ -90,7 +90,7 @@ void TestQgsRubberband::testAddSingleMultiGeometries()
QgsGeometry* geomSinglePart = QgsGeometry::fromWkt( "POLYGON((-0.00022418 -0.00000279,-0.0001039 0.00002395,-0.00008677 -0.00005313,-0.00020705 -0.00007987,-0.00022418 -0.00000279))" );
QgsGeometry* geomMultiPart = QgsGeometry::fromWkt( "MULTIPOLYGON(((-0.00018203 0.00012178,-0.00009444 0.00014125,-0.00007861 0.00007001,-0.00016619 0.00005054,-0.00018203 0.00012178)),((-0.00030957 0.00009464,-0.00021849 0.00011489,-0.00020447 0.00005184,-0.00029555 0.00003158,-0.00030957 0.00009464)))" );
- mCanvas->setExtent(QgsRectangle(-1e-3,-1e-3,1e-3,1e-3)); // otherwise point cannot be converted to canvas coord
+ mCanvas->setExtent( QgsRectangle( -1e-3, -1e-3, 1e-3, 1e-3 ) ); // otherwise point cannot be converted to canvas coord
mRubberband->addGeometry( geomSinglePart, mPolygonLayer );
mRubberband->addGeometry( geomMultiPart, mPolygonLayer );