Skip to content
Permalink
Browse files

src/3d: tag false positive cppcheck memleak errors

  • Loading branch information
rouault authored and nyalldawson committed Jun 13, 2020
1 parent b32bdb2 commit ef8d0dc6c84a2187d3771cf4ac9a73ff152aec6a
@@ -162,6 +162,9 @@ Qgs3DMapScene::Qgs3DMapScene( const Qgs3DMapSettings &map, QgsAbstract3DEngine *
// it _somehow_ works even when frustum culling is enabled with some camera positions,
// but then when zoomed in more it would disappear - so let's keep frustum culling disabled
mEngine->setFrustumCullingEnabled( false );

// cppcheck wrongly believes skyBox will leak
// cppcheck-suppress memleak
}

// force initial update of chunked entities
@@ -196,6 +196,9 @@ void QgsBufferedLine3DSymbolHandler::makeEntity( Qt3DCore::QEntity *parent, cons

if ( !selected )
entity->findChild<Qt3DRender::QGeometryRenderer *>()->setObjectName( QStringLiteral( "main" ) ); // temporary measure to distinguish between "selected" and "main"

// cppcheck wrongly believes entity will leak
// cppcheck-suppress memleak
}


@@ -148,6 +148,9 @@ void QgsInstancedPoint3DSymbolHandler::makeEntity( Qt3DCore::QEntity *parent, co
entity->addComponent( renderer( mSymbol, out.positions ) );
entity->addComponent( mat );
entity->setParent( parent );

// cppcheck wrongly believes entity will leak
// cppcheck-suppress memleak
}


@@ -446,6 +449,9 @@ void QgsModelPoint3DSymbolHandler::addSceneEntities( const Qgs3DMapSettings &map
entity->addComponent( modelLoader );
entity->addComponent( transform( position, symbol ) );
entity->setParent( parent );

// cppcheck wrongly believes entity will leak
// cppcheck-suppress memleak
}
}

@@ -474,6 +480,9 @@ void QgsModelPoint3DSymbolHandler::addMeshEntities( const Qgs3DMapSettings &map,
entity->addComponent( mat );
entity->addComponent( transform( position, symbol ) );
entity->setParent( parent );

// cppcheck wrongly believes entity will leak
// cppcheck-suppress memleak
}
}

@@ -586,6 +595,9 @@ void QgsPoint3DBillboardSymbolHandler::makeEntity( Qt3DCore::QEntity *parent, co
entity->addComponent( billboardTransform );
entity->addComponent( billboardGeometryRenderer );
entity->setParent( parent );

// cppcheck wrongly believes entity will leak
// cppcheck-suppress memleak
}


@@ -247,6 +247,8 @@ void QgsPolygon3DSymbolHandler::makeEntity( Qt3DCore::QEntity *parent, const Qgs

if ( !selected )
entity->findChild<Qt3DRender::QGeometryRenderer *>()->setObjectName( QStringLiteral( "main" ) ); // temporary measure to distinguish between "selected" and "main"
// cppcheck wrongly believes entity will leak
// cppcheck-suppress memleak
}


0 comments on commit ef8d0dc

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