[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Sep 28 16:29:43 CEST 2004


CVS commit by staikos: 

1) Correct strange code in kstdoc relating to data source loading
2) debugging added to piolib source


  M +2 -2      kstdoc.cpp   1.125
  M +7 -2      datasources/planck/planck.cpp   1.21


--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.124:1.125
@@ -145,5 +145,4 @@ bool KstDoc::openDocument(const KURL& ur
                           int o_n, int o_f, int o_s, bool o_ave) {
   // Temp variables
-  KstDataSourcePtr file;
   KstRVectorPtr vector;
 
@@ -203,4 +202,5 @@ bool KstDoc::openDocument(const KURL& ur
       } else if (e.tagName() == "kstfile") {
         KstWriteLocker dswl(&KST::dataSourceList.lock());
+        KstDataSourcePtr file;
         if (o_file == "|") {
           file = KstDataSource::loadSource(e);
@@ -287,5 +287,5 @@ bool KstDoc::openDocument(const KURL& ur
         }
       } else {
-        KstDebug::self()->log(i18n("Unsupported element '%1' in file %2.").arg(e.tagName()).arg(file->fileName()), KstDebug::Warning);
+        KstDebug::self()->log(i18n("Unsupported element '%1' in file %2.").arg(e.tagName()).arg(o_file), KstDebug::Warning);
       }
     }

--- kdeextragear-2/kst/kst/datasources/planck/planck.cpp  #1.20:1.21
@@ -18,4 +18,6 @@
 #include "planck.h"
 
+#include <assert.h>
+
 #include <kdebug.h>
 
@@ -38,8 +40,10 @@ PlanckSource::PlanckSource(const QString
     _valid = true;
   }
+  //kdDebug() << "Planck source " << (void*)this << " created" << endl;
 }
 
 
 PlanckSource::~PlanckSource() {
+  //kdDebug() << "Planck source " << (void*)this << " destroyed" << endl;
 }
 
@@ -56,5 +60,5 @@ KstObject::UpdateType PlanckSource::upda
 
 int PlanckSource::readField(double *v, const QString& field, int s, int n) {
-  kdDebug() << "Planck read field " << field << " - " << n << " samples from " << s << endl;
+  //kdDebug() << "Planck read field " << field << " - " << n << " samples from " << s << endl;
   if (field.lower() == "index") {
     if (n < 0) {
@@ -118,4 +122,5 @@ int PlanckSource::frameCount(const QStri
     int maxLen = 0;
     for (QStringList::ConstIterator i = _fieldList.begin(); i != _fieldList.end(); ++i) {
+      assert(!(*i).isEmpty());
       QSize sz = _planckObject->range(*i);
       maxLen = QMAX(sz.height() - sz.width() + 1, maxLen);
@@ -169,5 +174,5 @@ QStringList provides_planck() {
 int understands_planck(const QString& filename) {
   bool rc = Planck::validDatabase(filename);
-  kdDebug() << "-> Valid database? " << rc << endl;
+  kdDebug() << "-> Valid piolib database? " << rc << endl;
   return rc ? 100 : 0;
 }





More information about the Kst mailing list