[Kst] kdeextragear-2/kst/kst/datasources/planck

George Staikos staikos at kde.org
Fri Oct 1 13:05:45 CEST 2004


CVS commit by staikos: 

Jean-Marc says this is better input for piolib


  M +7 -5      planckobj.cpp   1.21


--- kdeextragear-2/kst/kst/datasources/planck/planckobj.cpp  #1.20:1.21
@@ -177,10 +177,12 @@ int Object::readObject(const QString& ob
     }
 
-    QString range;
+    const char *rangeptr = 0L;
+    QString rstr; // need to keep the QString around!!
 
     if (start < 0 || end < start) {
-      // Leave blank
+      rangeptr = 0L;
     } else {
-      range = QString("Begin=%1\nEnd=%2").arg(start).arg(end);
+      rstr = QString("Begin=%1\nEnd=%2").arg(start).arg(end);
+      rangeptr = rstr.latin1();
     }
 
@@ -199,5 +201,5 @@ int Object::readObject(const QString& ob
         const_cast<char*>("Written"),
         const_cast<char*>("PIODOUBLE"),
-        const_cast<char*>(range.latin1()),
+        const_cast<char*>(rangeptr),
         &MyGroup, &MyObject, &MyData, &MyDataFlag);
 
@@ -219,5 +221,5 @@ int Object::readObject(const QString& ob
           ObjName, 
           const_cast<char*>("PIODOUBLE"),
-          const_cast<char*>(range.latin1()),
+          const_cast<char*>(rangeptr),
           const_cast<char*>("Written"), 
           MyGroup, 





More information about the Kst mailing list