From kde-commits Wed Dec 31 21:02:48 2014 From: Thomas Friedrichsmeier Date: Wed, 31 Dec 2014 21:02:48 +0000 To: kde-commits Subject: [rkward/development/plugin_management_to_loadlibs] rkward/plugin: When clearing component map, also Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=142005978107609 Git commit dc9e2e8c1f7ff33d50865a33ad9c31185c7c235a by Thomas Friedrichsmei= er. Committed on 31/12/2014 at 21:02. Pushed by tfry into branch 'development/plugin_management_to_loadlibs'. When clearing component map, also clear contexts. M +5 -1 rkward/plugin/rkcomponentmap.cpp http://commits.kde.org/rkward/dc9e2e8c1f7ff33d50865a33ad9c31185c7c235a diff --git a/rkward/plugin/rkcomponentmap.cpp b/rkward/plugin/rkcomponentma= p.cpp index e0692b8..4dc1cf2 100644 --- a/rkward/plugin/rkcomponentmap.cpp +++ b/rkward/plugin/rkcomponentmap.cpp @@ -318,7 +318,7 @@ void RKComponentMap::clearAll () { RK_TRACE (PLUGIN); = actionCollection ()->clear (); - for (ComponentMap::iterator it =3D components.begin (); it !=3D component= s.end (); ++it) { + for (ComponentMap::const_iterator it =3D components.constBegin (); it != =3D components.constEnd (); ++it) { delete (it.value ()); /* TODO: this is not technically correct, as there may be several actions = for this id, and we're only deleting one. But practically this should not r= eally be relevant. */ delete (actionCollection ()->action (it.key ())); @@ -331,6 +331,10 @@ void RKComponentMap::clearAll () { pluginmapfiles.clear (); component_attributes.clear (); component_dependencies.clear (); + for (RKComponentContextMap::const_iterator it =3D contexts.constBegin ();= it !=3D contexts.constEnd (); ++it) { + delete (it.value ()); + } + contexts.clear (); = clearGUIDescription (); =20