Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix leak in diagram renderer
  • Loading branch information
nyalldawson committed Aug 25, 2015
1 parent 74234e1 commit 572a3f4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -185,6 +185,7 @@ QgsVectorLayer::~QgsVectorLayer()
delete mCache;
delete mLabel;
delete mDiagramLayerSettings;
delete mDiagramRenderer;

delete mActions;

Expand Down Expand Up @@ -2272,7 +2273,7 @@ bool QgsVectorLayer::deleteAttributes( QList<int> attrs )

qSort( attrs.begin(), attrs.end(), qGreater<int>() );

Q_FOREACH( int attr, attrs )
Q_FOREACH ( int attr, attrs )
{
if ( deleteAttribute( attr ) )
{
Expand Down Expand Up @@ -3031,7 +3032,7 @@ void QgsVectorLayer::uniqueValues( int index, QList<QVariant> &uniqueValues, int
if ( mEditBuffer )
{
QSet<QString> vals;
Q_FOREACH( const QVariant& v, uniqueValues )
Q_FOREACH ( const QVariant& v, uniqueValues )
{
vals << v.toString();
}
Expand Down Expand Up @@ -3861,7 +3862,7 @@ void QgsVectorLayer::invalidateSymbolCountedFlag()

void QgsVectorLayer::onRelationsLoaded()
{
Q_FOREACH( QgsAttributeEditorElement* elem, mAttributeEditorElements )
Q_FOREACH ( QgsAttributeEditorElement* elem, mAttributeEditorElements )
{
if ( elem->type() == QgsAttributeEditorElement::AeTypeContainer )
{
Expand All @@ -3870,7 +3871,7 @@ void QgsVectorLayer::onRelationsLoaded()
continue;

QList<QgsAttributeEditorElement*> relations = cont->findElements( QgsAttributeEditorElement::AeTypeRelation );
Q_FOREACH( QgsAttributeEditorElement* relElem, relations )
Q_FOREACH ( QgsAttributeEditorElement* relElem, relations )
{
QgsAttributeEditorRelation* rel = dynamic_cast< QgsAttributeEditorRelation* >( relElem );
if ( !rel )
Expand Down Expand Up @@ -3939,7 +3940,7 @@ QDomElement QgsAttributeEditorContainer::toDomElement( QDomDocument& doc ) const
QDomElement elem = doc.createElement( "attributeEditorContainer" );
elem.setAttribute( "name", mName );

Q_FOREACH( QgsAttributeEditorElement* child, mChildren )
Q_FOREACH ( QgsAttributeEditorElement* child, mChildren )
{
elem.appendChild( child->toDomElement( doc ) );
}
Expand All @@ -3960,7 +3961,7 @@ QList<QgsAttributeEditorElement*> QgsAttributeEditorContainer::findElements( Qgs
{
QList<QgsAttributeEditorElement*> results;

Q_FOREACH( QgsAttributeEditorElement* elem, mChildren )
Q_FOREACH ( QgsAttributeEditorElement* elem, mChildren )
{
if ( elem->type() == type )
{
Expand Down

0 comments on commit 572a3f4

Please sign in to comment.