[Kst] extragear/graphics/kst/src/libkstapp

George Staikos staikos at kde.org
Thu May 25 15:36:58 CEST 2006


SVN commit 544596 by staikos:

the recursive part of this function is odd... but anyway let's add const.


 M  +2 -2      kstviewobject.cpp  
 M  +1 -1      kstviewobject.h  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.cpp #544595:544596
@@ -1519,14 +1519,14 @@
 }
 
 
-void KstViewObject::recursivelyQuery(bool (KstViewObject::*method)() const, KstViewObjectList& list, bool matchRecurse) {
+void KstViewObject::recursivelyQuery(bool (KstViewObject::*method)() const, KstViewObjectList& list, bool matchRecurse) const {
   bool has = (this->*method)();
   if (has) {
     list.append(this);
   }
 
   if (!has || (has && matchRecurse)) {
-    for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
+    for (KstViewObjectList::ConstIterator i = _children.begin(); i != _children.end(); ++i) {
       (*i)->recursivelyQuery(method, list, matchRecurse);
     }
   }
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.h #544595:544596
@@ -203,7 +203,7 @@
     void selectAll();
     void unselectAll();
 
-    virtual void recursivelyQuery(bool (KstViewObject::*method)() const, KstViewObjectList& list, bool matchRecurse = false);
+    void recursivelyQuery(bool (KstViewObject::*method)() const, KstViewObjectList& list, bool matchRecurse = false) const;
 
     virtual void detach(); // remove from its parent
 


More information about the Kst mailing list