[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [rkward/development/plugin_management_to_loadlibs] rkward/plugin: When clearing component map, also 
From:       Thomas Friedrichsmeier <thomas.friedrichsmeier () ruhr-uni-bochum ! de>
Date:       2014-12-31 21:02:48
Message-ID: E1Y6QPo-00081s-QX () scm ! kde ! org
[Download RAW message or body]

Git commit dc9e2e8c1f7ff33d50865a33ad9c31185c7c235a by Thomas Friedrichsmeier.
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/rkcomponentmap.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 = components.begin (); it != components.end (); \
++it) { +	for (ComponentMap::const_iterator it = components.constBegin (); it != \
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 really 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 = contexts.constBegin (); it != \
contexts.constEnd (); ++it) { +		delete (it.value ());
+	}
+	contexts.clear ();
 
 	clearGUIDescription ();
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic