Fix memory leak on theme changes.
svn path=/trunk/KDE/kdelibs/; revision=961369
This commit is contained in:
parent
af3c1f881d
commit
6bb7eb1dee
@ -144,10 +144,11 @@ void ExtenderGroup::collapseGroup()
|
|||||||
|
|
||||||
|
|
||||||
ExtenderGroupPrivate::ExtenderGroupPrivate(ExtenderGroup *group)
|
ExtenderGroupPrivate::ExtenderGroupPrivate(ExtenderGroup *group)
|
||||||
: collapsed(true),
|
: q(group),
|
||||||
|
svg(new Svg(group)),
|
||||||
|
collapsed(true),
|
||||||
autoHide(true)
|
autoHide(true)
|
||||||
{
|
{
|
||||||
q = group;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ExtenderGroupPrivate::~ExtenderGroupPrivate()
|
ExtenderGroupPrivate::~ExtenderGroupPrivate()
|
||||||
@ -183,7 +184,6 @@ void ExtenderGroupPrivate::removeItemFromGroup(Plasma::ExtenderItem *item)
|
|||||||
|
|
||||||
void ExtenderGroupPrivate::themeChanged()
|
void ExtenderGroupPrivate::themeChanged()
|
||||||
{
|
{
|
||||||
Plasma::Svg *svg = new Plasma::Svg(q);///Who deletes the svg? (Looks like a memory hog/leak on multiple theme changes)
|
|
||||||
svg->setImagePath("widgets/configuration-icons");
|
svg->setImagePath("widgets/configuration-icons");
|
||||||
svg->resize();
|
svg->resize();
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ namespace Plasma
|
|||||||
|
|
||||||
class ExtenderGroup;
|
class ExtenderGroup;
|
||||||
class ExtenderItem;
|
class ExtenderItem;
|
||||||
|
class Svg;
|
||||||
|
|
||||||
class ExtenderGroupPrivate
|
class ExtenderGroupPrivate
|
||||||
{
|
{
|
||||||
@ -37,6 +38,7 @@ class ExtenderGroupPrivate
|
|||||||
void themeChanged();
|
void themeChanged();
|
||||||
|
|
||||||
Plasma::ExtenderGroup *q;
|
Plasma::ExtenderGroup *q;
|
||||||
|
Plasma::Svg *svg;
|
||||||
bool collapsed;
|
bool collapsed;
|
||||||
bool autoHide;
|
bool autoHide;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user