[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Jun 29 18:29:11 CEST 2004


CVS commit by staikos: 

gcc 2.95 seems to have template expansion problems.  This works around it.  I
am still encountering linking errors on libkst though.


  M +5 -5      kst2dplot.cpp   1.119
  M +15 -1     kst2dplot.h   1.48


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.118:1.119
@@ -21,4 +21,5 @@
 // include files for Qt
 #include <qapplication.h>
+#include <qbitmap.h>
 #include <qclipboard.h>
 #include <qcolor.h>
@@ -27,5 +28,4 @@
 #include <qnamespace.h>
 #include <qpainter.h>
-#include <qbitmap.h>
 #include <qrect.h>
 #include <qstring.h>
@@ -35,11 +35,13 @@
 #include <kdebug.h>
 #include <klocale.h>
-#include <kpopupmenu.h>
 #include <kmdimainfrm.h>
+#include <kpopupmenu.h>
 
 // application specific includes
+#include "kst.h"
 #include "kst2dplot.h"
-#include "kstdatacollection.h"
 #include "kstcurvedialog_i.h"
+#include "kstdatacollection.h"
+#include "kstfitcurve.h"
 #include "kstfitdialog_i.h"
 #include "kstlabeldialog_i.h"
@@ -51,6 +53,4 @@
 #include "kstviewwidget.h"
 #include "kstviewwindow.h"
-#include "kstfitcurve.h"
-#include "kst.h"
 
 Kst2DPlot::Kst2DPlot(const QString& in_tag,

--- kdeextragear-2/kst/kst/kst2dplot.h  #1.47:1.48
@@ -222,4 +222,17 @@ protected:
 
 private:
+  Kst2DPlotList plotList() {
+    Kst2DPlotList pl;
+    for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
+      KstSharedPtr<Kst2DPlot> p = dynamic_cast<Kst2DPlot*>((*i).data());
+      if (p) {
+        pl.append(p);
+      }
+
+      pl += (*i)->findChildrenType<Kst2DPlot>(true);
+    }
+    return pl;
+  }
+
   template<class T>
   void updateTiedPlots(void (Kst2DPlot::*method)(T), T arg, KstViewWidget *view);
@@ -292,5 +305,6 @@ template<class T>
 void Kst2DPlot::updateTiedPlots(void (Kst2DPlot::*method)(T), T arg, KstViewWidget *view) {
   if (isTied()) {
-    Kst2DPlotList pl = view->viewObject()->findChildrenType<Kst2DPlot>(true);
+    Kst2DPlotList pl = plotList();
+
     for (Kst2DPlotList::Iterator i = pl.begin(); i != pl.end(); ++i) {
       Kst2DPlotPtr p = *i;





More information about the Kst mailing list