4 changes: 2 additions & 2 deletions src/core/raster/qgsrastertransparency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void QgsRasterTransparency::setTransparentThreeValuePixelList( QList<QgsRasterTr
int QgsRasterTransparency::alphaValue( double theValue, int theGlobalTransparency ) const
{
//if NaN return 0, transparent
if ( qIsNaN(theValue) )
if ( qIsNaN( theValue ) )
{
return 0;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ int QgsRasterTransparency::alphaValue( double theValue, int theGlobalTransparenc
int QgsRasterTransparency::alphaValue( double theRedValue, double theGreenValue, double theBlueValue, int theGlobalTransparency ) const
{
//if NaN return 0, transparent
if ( qIsNaN(theRedValue) || qIsNaN(theGreenValue) || qIsNaN(theBlueValue) )
if ( qIsNaN( theRedValue ) || qIsNaN( theGreenValue ) || qIsNaN( theBlueValue ) )
{
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsexpressionbuilderdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ QgsExpressionBuilderDialog::QgsExpressionBuilderDialog( QgsVectorLayer* layer, Q
builder->setLayer( layer );
builder->setExpressionText( startText );
builder->loadFieldNames();
builder->loadRecent(mRecentKey);
builder->loadRecent( mRecentKey );

QSettings settings;
restoreGeometry( settings.value( "/Windows/ExpressionBuilderDialog/geometry" ).toByteArray() );
Expand Down Expand Up @@ -58,7 +58,7 @@ void QgsExpressionBuilderDialog::done( int r )

void QgsExpressionBuilderDialog::accept()
{
builder->saveToRecent(mRecentKey);
builder->saveToRecent( mRecentKey );
QDialog::accept();
}

Expand Down
11 changes: 6 additions & 5 deletions src/gui/qgsexpressionbuilderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,16 @@ void QgsExpressionBuilderWidget::loadRecent( QString key )
QString name = tr( "Recent (%1)" ).arg( key );
if ( mExpressionGroups.contains( name ) )
{
QgsExpressionItem* node = mExpressionGroups.value( name );
node->removeRows(0, node->rowCount() );
}
QgsExpressionItem* node = mExpressionGroups.value( name );
node->removeRows( 0, node->rowCount() );
}

QSettings settings;
QString location = QString( "/expressions/recent/%1" ).arg( key );
QStringList expressions = settings.value( location ).toStringList();
foreach ( QString expression, expressions ) {
this->registerItem( name, expression, expression, expression );
foreach ( QString expression, expressions )
{
this->registerItem( name, expression, expression, expression );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsrubberband.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void QgsRubberBand::movePoint( int index, const QgsPoint& p, int geometryIndex )

void QgsRubberBand::setToGeometry( QgsGeometry* geom, QgsVectorLayer* layer )
{
if( !geom )
if ( !geom )
{
reset( mGeometryType );
return;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrfeatureiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ bool QgsOgrFeatureIterator::prepareSimplification( const QgsSimplifyMethod& simp
if ( !( mRequest.flags() & QgsFeatureRequest::NoGeometry ) && simplifyMethod.methodType() != QgsSimplifyMethod::NoSimplification && !simplifyMethod.forceLocalOptimization() )
{
QgsSimplifyMethod::MethodType methodType = simplifyMethod.methodType();
Q_UNUSED( methodType);
Q_UNUSED( methodType );

#if defined(GDAL_VERSION_NUM) && defined(GDAL_COMPUTE_VERSION)
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(1,11,0)
Expand Down
6 changes: 3 additions & 3 deletions src/providers/ogr/qgsogrgeometrysimplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ bool QgsOgrMapToPixelSimplifier::simplifyOgrGeometry( OGRGeometryH geometry, boo
{
int numPoints = OGR_G_GetPointCount( geometry );

if (( isaLinearRing && numPoints <= 5 ) || ( !isaLinearRing && numPoints <= 4 ) )
if (( isaLinearRing && numPoints <= 5 ) || ( !isaLinearRing && numPoints <= 4 ) )
return false;

OGREnvelope env;
Expand Down Expand Up @@ -205,7 +205,7 @@ bool QgsOgrMapToPixelSimplifier::simplifyOgrGeometry( OGRGeometryH geometry, boo

if ( simplifyOgrGeometry( geometryType, xptr, 16, yptr, 16, numPoints, numSimplifiedPoints ) )
{
if (( isaLinearRing && numSimplifiedPoints <= 4 ) || ( !isaLinearRing && numSimplifiedPoints <= 1 ) )
if (( isaLinearRing && numSimplifiedPoints <= 4 ) || ( !isaLinearRing && numSimplifiedPoints <= 1 ) )
points = getEnvelopePoints( envelope, numSimplifiedPoints, isaLinearRing );

setGeometryPoints( geometry, points, numSimplifiedPoints );
Expand Down Expand Up @@ -246,7 +246,7 @@ bool QgsOgrMapToPixelSimplifier::simplifyOgrGeometry( OGRGeometryH geometry, boo
return false;
}

//! Load a point array to the specified LineString geometry
//! Load a point array to the specified LineString geometry
void QgsOgrMapToPixelSimplifier::setGeometryPoints( OGRGeometryH geometry, QgsPoint* points, int numPoints )
{
double* xptr = ( double* )points;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrgeometrysimplifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class QgsOgrMapToPixelSimplifier : public QgsOgrAbstractGeometrySimplifier, QgsM
//! Returns a point buffer of the specified envelope
QgsPoint* getEnvelopePoints( const QgsRectangle& envelope, int& numPoints, bool isaLinearRing );

//! Load a point array to the specified LineString geometry
//! Load a point array to the specified LineString geometry
static void setGeometryPoints( OGRGeometryH geometry, QgsPoint* points, int numPoints );

public:
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2567,7 +2567,7 @@ bool QgsPostgresProvider::getGeometryDetails()

QString detectedType = mRequestedGeomType == QGis::WKBUnknown ? "" : QgsPostgresConn::postgisWkbTypeName( mRequestedGeomType );
QString detectedSrid = mRequestedSrid;
if ( !schemaName.isEmpty() && (detectedType.isEmpty() || detectedSrid.isEmpty() ) )
if ( !schemaName.isEmpty() && ( detectedType.isEmpty() || detectedSrid.isEmpty() ) )
{
// check geometry columns
sql = QString( "SELECT upper(type),srid FROM geometry_columns WHERE f_table_name=%1 AND f_geometry_column=%2 AND f_table_schema=%3" )
Expand Down
8 changes: 4 additions & 4 deletions src/providers/wms/qgswmsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2651,7 +2651,7 @@ bool QgsWmsProvider::extentForNonTiledLayer( const QString& layerName, const QSt
return false;

QgsCoordinateTransform xform( wgs, dst );
QgsDebugMsg( QString("transforming layer extent %1").arg( extent.toString( true ) ) );
QgsDebugMsg( QString( "transforming layer extent %1" ).arg( extent.toString( true ) ) );
try
{
extent = xform.transformBoundingBox( extent );
Expand All @@ -2661,7 +2661,7 @@ bool QgsWmsProvider::extentForNonTiledLayer( const QString& layerName, const QSt
Q_UNUSED( cse );
return false;
}
QgsDebugMsg( QString("transformed layer extent %1").arg( extent.toString( true ) ) );
QgsDebugMsg( QString( "transformed layer extent %1" ).arg( extent.toString( true ) ) );

//make sure extent does not contain 'inf' or 'nan'
if ( !extent.isFinite() )
Expand Down Expand Up @@ -3166,7 +3166,7 @@ void QgsWmsProvider::parseWMTSContents( QDomElement const &e )
}

// make sure that all layers have a bounding box
for( QList<QgsWmtsTileLayer>::iterator it = mTileLayersSupported.begin(); it != mTileLayersSupported.end(); ++it )
for ( QList<QgsWmtsTileLayer>::iterator it = mTileLayersSupported.begin(); it != mTileLayersSupported.end(); ++it )
{
QgsWmtsTileLayer& l = *it;

Expand Down Expand Up @@ -3211,7 +3211,7 @@ bool QgsWmsProvider::detectTileLayerBoundingBox( QgsWmtsTileLayer& l )
tm.topLeft.y() - res * tm.tileHeight * tm.matrixHeight );

QgsDebugMsg( QString( "detecting WMTS layer bounding box: tileset %1 matrix %2 crs %3 res %4" )
.arg( tmsIt->identifier ).arg( tm.identifier ).arg( tmsIt->crs ).arg( res ) );
.arg( tmsIt->identifier ).arg( tm.identifier ).arg( tmsIt->crs ).arg( res ) );

QgsRectangle extent( tm.topLeft, bottomRight );
extent.normalize();
Expand Down