Skip to content

Commit 572a3f4

Browse files
committedAug 25, 2015
Fix leak in diagram renderer
1 parent 74234e1 commit 572a3f4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
 

‎src/core/qgsvectorlayer.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ QgsVectorLayer::~QgsVectorLayer()
185185
delete mCache;
186186
delete mLabel;
187187
delete mDiagramLayerSettings;
188+
delete mDiagramRenderer;
188189

189190
delete mActions;
190191

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

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

2275-
Q_FOREACH( int attr, attrs )
2276+
Q_FOREACH ( int attr, attrs )
22762277
{
22772278
if ( deleteAttribute( attr ) )
22782279
{
@@ -3031,7 +3032,7 @@ void QgsVectorLayer::uniqueValues( int index, QList<QVariant> &uniqueValues, int
30313032
if ( mEditBuffer )
30323033
{
30333034
QSet<QString> vals;
3034-
Q_FOREACH( const QVariant& v, uniqueValues )
3035+
Q_FOREACH ( const QVariant& v, uniqueValues )
30353036
{
30363037
vals << v.toString();
30373038
}
@@ -3861,7 +3862,7 @@ void QgsVectorLayer::invalidateSymbolCountedFlag()
38613862

38623863
void QgsVectorLayer::onRelationsLoaded()
38633864
{
3864-
Q_FOREACH( QgsAttributeEditorElement* elem, mAttributeEditorElements )
3865+
Q_FOREACH ( QgsAttributeEditorElement* elem, mAttributeEditorElements )
38653866
{
38663867
if ( elem->type() == QgsAttributeEditorElement::AeTypeContainer )
38673868
{
@@ -3870,7 +3871,7 @@ void QgsVectorLayer::onRelationsLoaded()
38703871
continue;
38713872

38723873
QList<QgsAttributeEditorElement*> relations = cont->findElements( QgsAttributeEditorElement::AeTypeRelation );
3873-
Q_FOREACH( QgsAttributeEditorElement* relElem, relations )
3874+
Q_FOREACH ( QgsAttributeEditorElement* relElem, relations )
38743875
{
38753876
QgsAttributeEditorRelation* rel = dynamic_cast< QgsAttributeEditorRelation* >( relElem );
38763877
if ( !rel )
@@ -3939,7 +3940,7 @@ QDomElement QgsAttributeEditorContainer::toDomElement( QDomDocument& doc ) const
39393940
QDomElement elem = doc.createElement( "attributeEditorContainer" );
39403941
elem.setAttribute( "name", mName );
39413942

3942-
Q_FOREACH( QgsAttributeEditorElement* child, mChildren )
3943+
Q_FOREACH ( QgsAttributeEditorElement* child, mChildren )
39433944
{
39443945
elem.appendChild( child->toDomElement( doc ) );
39453946
}
@@ -3960,7 +3961,7 @@ QList<QgsAttributeEditorElement*> QgsAttributeEditorContainer::findElements( Qgs
39603961
{
39613962
QList<QgsAttributeEditorElement*> results;
39623963

3963-
Q_FOREACH( QgsAttributeEditorElement* elem, mChildren )
3964+
Q_FOREACH ( QgsAttributeEditorElement* elem, mChildren )
39643965
{
39653966
if ( elem->type() == type )
39663967
{

0 commit comments

Comments
 (0)
Please sign in to comment.