Skip to content

Commit c40a764

Browse files
committedNov 19, 2015
indentation update
1 parent 2fcdef4 commit c40a764

21 files changed

+135
-119
lines changed
 

‎python/plugins/processing/algs/lidar/LidarToolsAlgorithmProvider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def __init__(self):
204204
Catalog(), CloudMetrics(), CanopyMaxima(), CanopyModel(), ClipData(),
205205
Csv2Grid(), Cover(), FilterData(), GridMetrics(), GroundFilter(),
206206
GridSurfaceCreate(), MergeData(), TinSurfaceCreate(), PolyClipData(),
207-
DTM2TIF(), FirstLastReturn(), ASCII2DTM()
207+
DTM2TIF(), FirstLastReturn(), ASCII2DTM()
208208
]
209209
for alg in fusiontools:
210210
alg.group = 'Fusion'

‎src/core/qgsmaprenderer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ class CORE_EXPORT QgsMapRenderer : public QObject
338338
/** Set a feature filter provider to filter the features
339339
* @param ffp the feature filter provider
340340
*/
341-
void setFeatureFilterProvider( const QgsFeatureFilterProvider* ffp ) {
341+
void setFeatureFilterProvider( const QgsFeatureFilterProvider* ffp )
342+
{
342343
mRenderContext.setFeatureFilterProvider( ffp );
343344
}
344345

‎src/core/qgsrendercontext.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,20 @@ QgsRenderContext::QgsRenderContext()
3030
, mScaleFactor( 1.0 )
3131
, mRasterScaleFactor( 1.0 )
3232
, mRendererScale( 1.0 )
33-
, mLabelingEngine( NULL )
33+
, mLabelingEngine( 0 )
3434
, mLabelingEngine2( 0 )
3535
, mGeometry( 0 )
36-
, mFeatureFilterProvider( NULL )
36+
, mFeatureFilterProvider( 0 )
3737
{
3838
mVectorSimplifyMethod.setSimplifyHints( QgsVectorSimplifyMethod::NoSimplification );
3939
}
4040

4141
QgsRenderContext::~QgsRenderContext()
4242
{
43-
if ( mFeatureFilterProvider != NULL ) {
43+
if ( mFeatureFilterProvider )
44+
{
4445
delete mFeatureFilterProvider;
45-
mFeatureFilterProvider = NULL;
46+
mFeatureFilterProvider = 0;
4647
}
4748
}
4849

@@ -150,11 +151,12 @@ void QgsRenderContext::setUseRenderingOptimization( bool enabled )
150151

151152
void QgsRenderContext::setFeatureFilterProvider( const QgsFeatureFilterProvider* ffp )
152153
{
153-
if ( mFeatureFilterProvider != NULL ) {
154+
if ( mFeatureFilterProvider )
155+
{
154156
delete mFeatureFilterProvider;
155-
mFeatureFilterProvider = NULL;
157+
mFeatureFilterProvider = 0;
156158
}
157-
if ( ffp != NULL )
159+
if ( ffp )
158160
{
159161
mFeatureFilterProvider = ffp->clone();
160162
}

‎src/core/qgsvectordataprovider.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
378378
* This forces QGIS to reopen a file or connection.
379379
* This can be required if the underlying file is replaced.
380380
*/
381-
virtual void forceReload() {
381+
virtual void forceReload()
382+
{
382383
emit dataChanged();
383384
}
384385

‎src/core/qgsvectorlayerrenderer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,21 +154,21 @@ bool QgsVectorLayerRenderer::render()
154154
.setSubsetOfAttributes( mAttrNames, mFields );
155155

156156
const QgsFeatureFilterProvider* featureFilterProvider = mContext.featureFilterProvider();
157-
if ( featureFilterProvider != NULL)
157+
if ( featureFilterProvider )
158158
{
159159
featureFilterProvider->filterFeatures( mLayer, featureRequest );
160160
}
161161
if ( !rendererFilter.isNull() )
162162
{
163163
featureRequest.setExpressionContext( mContext.expressionContext() );
164-
if ( featureRequest.filterExpression() == NULL )
164+
if ( !featureRequest.filterExpression() )
165165
{
166166
featureRequest.setFilterExpression( rendererFilter );
167167
}
168168
else
169169
{
170170
featureRequest.setFilterExpression( QString( "(%s) AND (%s)" )
171-
.arg( rendererFilter, featureRequest.filterExpression()->expression() ) );
171+
.arg( rendererFilter, featureRequest.filterExpression()->expression() ) );
172172
}
173173
}
174174

@@ -352,14 +352,14 @@ void QgsVectorLayerRenderer::drawRendererV2( QgsFeatureIterator& fit )
352352
}
353353
}
354354

355-
stopRendererV2( NULL );
355+
stopRendererV2( 0 );
356356
}
357357

358358
void QgsVectorLayerRenderer::drawRendererV2Levels( QgsFeatureIterator& fit )
359359
{
360360
QHash< QgsSymbolV2*, QList<QgsFeature> > features; // key = symbol, value = array of features
361361

362-
QgsSingleSymbolRendererV2* selRenderer = NULL;
362+
QgsSingleSymbolRendererV2* selRenderer = 0;
363363
if ( !mSelectedFeatureIds.isEmpty() )
364364
{
365365
selRenderer = new QgsSingleSymbolRendererV2( QgsSymbolV2::defaultSymbol( mGeometryType ) );

‎src/core/symbology-ng/qgssymbollayerv2utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ QList<QPolygonF> offsetLine( QPolygonF polyline, double dist, QGis::GeometryType
784784
QgsPolyline line = tempGeometry->asPolyline();
785785
// Reverse the line if offset was negative, see
786786
// http://hub.qgis.org/issues/13811
787-
if ( dist < 0 ) std::reverse(line.begin(), line.end() );
787+
if ( dist < 0 ) std::reverse( line.begin(), line.end() );
788788
resultLine.append( makeOffsetGeometry( line ) );
789789
delete tempGeometry;
790790
return resultLine;

‎src/server/qgsaccesscontrol.cpp

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,21 @@ void QgsAccessControl::filterFeatures( const QgsVectorLayer* layer, QgsFeatureRe
3131
for ( acIterator = mPluginsAccessControls->constBegin(); acIterator != mPluginsAccessControls->constEnd(); ++acIterator )
3232
{
3333
const QString expression = acIterator.value()->layerFilterExpression( layer );
34-
if ( expression != NULL ) {
34+
if ( expression )
35+
{
3536
expressions.append( expression );
3637
}
3738
}
38-
if ( !expressions.isEmpty() ) {
39-
featureRequest.setFilterExpression( expressions.join(" AND ") );
39+
if ( !expressions.isEmpty() )
40+
{
41+
featureRequest.setFilterExpression( expressions.join( " AND " ) );
4042
}
4143
}
4244

4345
/** Clone the object */
4446
QgsFeatureFilterProvider* QgsAccessControl::clone() const
4547
{
46-
return new QgsAccessControl(*this);
48+
return new QgsAccessControl( *this );
4749
}
4850

4951
/** Return an additional subset string (typically SQL) filter */
@@ -54,11 +56,12 @@ const QString QgsAccessControl::extraSubsetString( const QgsVectorLayer* layer )
5456
for ( acIterator = mPluginsAccessControls->constBegin(); acIterator != mPluginsAccessControls->constEnd(); ++acIterator )
5557
{
5658
const QString sql = acIterator.value()->layerFilterSubsetString( layer );
57-
if ( sql != NULL ) {
59+
if ( sql )
60+
{
5861
sqls.append( sql );
5962
}
6063
}
61-
return sqls.isEmpty() ? NULL : sqls.join(" AND ");
64+
return sqls.isEmpty() ? QString::null : sqls.join( " AND " );
6265
}
6366

6467
/** Return the layer read right */
@@ -67,7 +70,7 @@ bool QgsAccessControl::layerReadPermission( const QgsMapLayer* layer ) const
6770
QgsAccessControlFilterMap::const_iterator acIterator;
6871
for ( acIterator = mPluginsAccessControls->constBegin(); acIterator != mPluginsAccessControls->constEnd(); ++acIterator )
6972
{
70-
if ( !acIterator.value()->layerPermissions( layer ).canRead)
73+
if ( !acIterator.value()->layerPermissions( layer ).canRead )
7174
{
7275
return false;
7376
}
@@ -81,7 +84,7 @@ bool QgsAccessControl::layerInsertPermission( const QgsVectorLayer* layer ) cons
8184
QgsAccessControlFilterMap::const_iterator acIterator;
8285
for ( acIterator = mPluginsAccessControls->constBegin(); acIterator != mPluginsAccessControls->constEnd(); ++acIterator )
8386
{
84-
if ( !acIterator.value()->layerPermissions( layer ).canInsert)
87+
if ( !acIterator.value()->layerPermissions( layer ).canInsert )
8588
{
8689
return false;
8790
}
@@ -95,7 +98,7 @@ bool QgsAccessControl::layerUpdatePermission( const QgsVectorLayer* layer ) cons
9598
QgsAccessControlFilterMap::const_iterator acIterator;
9699
for ( acIterator = mPluginsAccessControls->constBegin(); acIterator != mPluginsAccessControls->constEnd(); ++acIterator )
97100
{
98-
if ( !acIterator.value()->layerPermissions( layer ).canUpdate)
101+
if ( !acIterator.value()->layerPermissions( layer ).canUpdate )
99102
{
100103
return false;
101104
}
@@ -109,7 +112,7 @@ bool QgsAccessControl::layerDeletePermission( const QgsVectorLayer* layer ) cons
109112
QgsAccessControlFilterMap::const_iterator acIterator;
110113
for ( acIterator = mPluginsAccessControls->constBegin(); acIterator != mPluginsAccessControls->constEnd(); ++acIterator )
111114
{
112-
if ( !acIterator.value()->layerPermissions( layer ).canDelete)
115+
if ( !acIterator.value()->layerPermissions( layer ).canDelete )
113116
{
114117
return false;
115118
}
@@ -125,7 +128,8 @@ const QStringList QgsAccessControl::layerAttributes( const QgsVectorLayer* layer
125128
for ( acIterator = mPluginsAccessControls->constBegin(); acIterator != mPluginsAccessControls->constEnd(); ++acIterator )
126129
{
127130
const QStringList* newAttributes = acIterator.value()->authorizedLayerAttributes( layer, currentAttributes );
128-
if (newAttributes != NULL) {
131+
if ( newAttributes )
132+
{
129133
currentAttributes = *newAttributes;
130134
}
131135
}
@@ -153,7 +157,8 @@ bool QgsAccessControl::fillCacheKey( QStringList& cacheKey ) const
153157
for ( acIterator = mPluginsAccessControls->constBegin(); acIterator != mPluginsAccessControls->constEnd(); ++acIterator )
154158
{
155159
QString newKey = acIterator.value()->cacheKey();
156-
if ( newKey.length() == 0 ) {
160+
if ( newKey.length() == 0 )
161+
{
157162
cacheKey.clear();
158163
return false;
159164
}

‎src/server/qgsaccesscontrolfilter.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ class SERVER_EXPORT QgsAccessControlFilter
5454
virtual ~QgsAccessControlFilter();
5555

5656
/** Describe the layer permission */
57-
struct LayerPermissions {
57+
struct LayerPermissions
58+
{
5859
bool canRead;
5960
bool canUpdate;
6061
bool canInsert;

‎src/server/qgsconfigcache.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ QgsWMSConfigParser *QgsConfigCache::wmsConfiguration(
142142
else
143143
{
144144
p = new QgsWMSProjectParser(
145-
filePath
145+
filePath
146146
#ifdef HAVE_SERVER_PYTHON_PLUGINS
147-
, accessControl
147+
, accessControl
148148
#endif
149149
);
150150
}

‎src/server/qgshttprequesthandler.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
QgsHttpRequestHandler::QgsHttpRequestHandler( const bool captureOutput /*= FALSE*/ )
3737
: QgsRequestHandler( )
3838
{
39-
mException = NULL;
39+
mException = 0;
4040
mHeadersSent = FALSE;
4141
mCaptureOutput = captureOutput;
4242
}
@@ -69,7 +69,7 @@ bool QgsHttpRequestHandler::responseReady() const
6969

7070
bool QgsHttpRequestHandler::exceptionRaised() const
7171
{
72-
return mException != NULL;
72+
return mException;
7373
}
7474

7575
void QgsHttpRequestHandler::setDefaultHeaders()
@@ -641,14 +641,14 @@ void QgsHttpRequestHandler::requestStringToParameterMap( const QString& request,
641641
QString QgsHttpRequestHandler::readPostBody() const
642642
{
643643
QgsMessageLog::logMessage( "QgsHttpRequestHandler::readPostBody" );
644-
char* lengthString = NULL;
644+
char* lengthString = 0;
645645
int length = 0;
646-
char* input = NULL;
646+
char* input = 0;
647647
QString inputString;
648648
QString lengthQString;
649649

650650
lengthString = getenv( "CONTENT_LENGTH" );
651-
if ( lengthString != NULL )
651+
if ( lengthString )
652652
{
653653
bool conversionSuccess = false;
654654
lengthQString = QString( lengthString );
@@ -663,7 +663,7 @@ QString QgsHttpRequestHandler::readPostBody() const
663663
input[i] = getchar();
664664
}
665665
//fgets(input, length+1, stdin);
666-
if ( input != NULL )
666+
if ( input )
667667
{
668668
inputString = QString::fromLocal8Bit( input );
669669
}
@@ -679,8 +679,9 @@ QString QgsHttpRequestHandler::readPostBody() const
679679
}
680680
}
681681
// Used by the tests
682-
else if ( getenv( "REQUEST_BODY" ) != NULL ) {
683-
inputString = getenv( "REQUEST_BODY" );
682+
else if ( getenv( "REQUEST_BODY" ) )
683+
{
684+
inputString = getenv( "REQUEST_BODY" );
684685
}
685686
return inputString;
686687
}

‎src/server/qgsowsserver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class QgsOWSServer
4040
#ifdef HAVE_SERVER_PYTHON_PLUGINS
4141
, mAccessControl( ac )
4242
#endif
43-
{}
43+
{}
4444
virtual ~QgsOWSServer() {}
4545

4646
virtual void executeRequest() = 0;

‎src/server/qgspostrequesthandler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ void QgsPostRequestHandler::parseInput()
5454
if ( !doc.setContent( inputString, true, &errorMsg, &line, &column ) )
5555
{
5656
char* requestMethod = getenv( "REQUEST_METHOD" );
57-
if ( requestMethod != NULL && strcmp( requestMethod, "POST" ) == 0 ) {
57+
if ( requestMethod && strcmp( requestMethod, "POST" ) == 0 )
58+
{
5859
QgsMessageLog::logMessage( QString( "Error at line %1, column %2: %3." ).arg( line ).arg( column ).arg( errorMsg ) );
5960
}
6061
requestStringToParameterMap( inputString, mParameterMap );

0 commit comments

Comments
 (0)
Please sign in to comment.