[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Sun Aug 8 04:13:10 CEST 2004


CVS commit by staikos: 

Added another unused virtual method to determine if the object is valid or not.
The idea is that when an object has an internal issue (failed large malloc, loss
of data file, etc), it should be able to get marked as "bad", visible in the
data manager, and then purge could [optionally?] remove the bad objects
recursively.

Our own sanity checks will still probably go into the data wizard for now.


  M +5 -0      kstdataobject.cpp   1.27
  M +41 -39    kstdataobject.h   1.24


--- kdeextragear-2/kst/kst/kstdataobject.cpp  #1.26:1.27
@@ -215,4 +215,9 @@ void KstDataObject::writeUnlock() const 
 }
 
+
+bool KstDataObject::isValid() const {
+  return true;
+}
+
 #include "kstdataobject.moc"
 // vim: ts=2 sw=2 et

--- kdeextragear-2/kst/kst/kstdataobject.h  #1.23:1.24
@@ -21,14 +21,14 @@
 
 #include "kstobject.h"
+#include "kstsharedptr.h"
 #include "kstvector.h"
 
 #include <qdom.h>
-#include "kstsharedptr.h"
 #include <qvaluelist.h>
 
 
 class KstDataObject : public KstObject {
-Q_OBJECT
-public:
+  Q_OBJECT
+  public:
   KstDataObject();
   KstDataObject(QDomElement& e);
@@ -66,8 +66,10 @@ public:
   virtual void writeUnlock() const;
 
-protected slots:
+    virtual bool isValid() const;
+
+  protected slots:
   virtual void _showDialog() = 0;
 
-protected:
+  protected:
   double *vectorRealloced(KstVectorPtr v, double *memptr, int newSize) const;
 





More information about the Kst mailing list