Skip to content
Permalink
Browse files

De-Q_FOREACH-ification

  • Loading branch information
wonder-sk committed Jan 18, 2019
1 parent 9875821 commit a01caa43fe54f44798da7e7c9f27f9c36cfb2c76
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/3d/qgsrulebased3drenderer.cpp
@@ -106,7 +106,7 @@ void QgsRuleBased3DRenderer::Rule::initFilter()
void QgsRuleBased3DRenderer::Rule::updateElseRules()
{
mElseRules.clear();
Q_FOREACH ( Rule *rule, mChildren )
for ( Rule *rule : qgis::as_const( mChildren ) )
{
if ( rule->isElse() )
mElseRules << rule;
@@ -142,7 +142,7 @@ const QgsRuleBased3DRenderer::Rule *QgsRuleBased3DRenderer::Rule::findRuleByKey(
if ( key == mRuleKey )
return this;

Q_FOREACH ( Rule *rule, mChildren )
for ( Rule *rule : qgis::as_const( mChildren ) )
{
const Rule *r = rule->findRuleByKey( key );
if ( r )
@@ -171,7 +171,7 @@ QgsRuleBased3DRenderer::Rule *QgsRuleBased3DRenderer::Rule::clone() const
Rule *newrule = new Rule( symbol, mFilterExp, mDescription );
newrule->setActive( mIsActive );
// clone children
Q_FOREACH ( Rule *rule, mChildren )
for ( Rule *rule : qgis::as_const( mChildren ) )
newrule->appendChild( rule->clone() );
return newrule;
}
@@ -277,7 +277,7 @@ void QgsRuleBased3DRenderer::Rule::createHandlers( QgsVectorLayer *layer, QgsRul
}

// call recursively
Q_FOREACH ( Rule *rule, mChildren )
for ( Rule *rule : qgis::as_const( mChildren ) )
{
rule->createHandlers( layer, handlers );
}
@@ -303,7 +303,7 @@ void QgsRuleBased3DRenderer::Rule::prepare( const Qgs3DRenderContext &context, Q
}

// call recursively
Q_FOREACH ( Rule *rule, mChildren )
for ( Rule *rule : qgis::as_const( mChildren ) )
{
rule->prepare( context, attributeNames, handlers );
}
@@ -326,7 +326,7 @@ QgsRuleBased3DRenderer::Rule::RegisterResult QgsRuleBased3DRenderer::Rule::regis
bool willRegisterSomething = false;

// call recursively
Q_FOREACH ( Rule *rule, mChildren )
for ( Rule *rule : qgis::as_const( mChildren ) )
{
// Don't process else rules yet
if ( !rule->isElse() )
@@ -341,7 +341,7 @@ QgsRuleBased3DRenderer::Rule::RegisterResult QgsRuleBased3DRenderer::Rule::regis
// If none of the rules passed then we jump into the else rules and process them.
if ( !willRegisterSomething )
{
Q_FOREACH ( Rule *rule, mElseRules )
for ( Rule *rule : qgis::as_const( mElseRules ) )
{
registered |= rule->registerFeature( feature, context, handlers ) != Filtered;
}
@@ -440,7 +440,7 @@ Qt3DCore::QEntity *QgsRuleBased3DRenderer::createEntity( const Qgs3DMapSettings
}

Qt3DCore::QEntity *entity = new Qt3DCore::QEntity;
Q_FOREACH ( QgsFeature3DHandler *handler, handlers.values() )
for ( QgsFeature3DHandler *handler : handlers.values() )
handler->finalize( entity, context );

qDeleteAll( handlers.values() );

0 comments on commit a01caa4

Please sign in to comment.
You can’t perform that action at this time.