[Kst] kst_planckio_branch: kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Fri Oct 10 05:19:38 CEST 2003
CVS commit by staikos:
more minor fixes or hacks
M +8 -4 kstfile.cpp 1.23.2.4
--- kdeextragear-2/kst/kst/kstfile.cpp #1.23.2.3:1.23.2.4
@@ -874,15 +874,17 @@ bool KstFile::planckUpdate() {
bool KstFile::planckInitFile() {
_planck = new Planck::TOI;
- _planck->setSource(Filename); // FIXME
+ _planck->setSource(Filename);
if (!_planck->isValid()) {
return false;
}
- _fieldList = _planck->fields("FIXME");
+ QStringList fields = QStringList::split(':', Filename);
+ // precondition: fields.size() == 3 <-- guaranteed by isValid() above
+ _fieldList = _planck->fields(fields[2]);
return true;
}
-int KstFile::planckReadField(double *V, const QString &field, int s, int n) {
+int KstFile::planckReadField(double *V, const QString& field, int s, int n) {
if (n == 0 || _planck.data() == 0 || !_planck->isValid() || !_fieldList.contains(field)) {
return 0;
@@ -893,5 +895,7 @@ int KstFile::planckReadField(double *V,
}
- return _planck->readObject("FIXME", field, V, s, s + n);
+ QStringList fields = QStringList::split(':', Filename); // FIXME: this is garbage
+ // precondition: fields.size() == 3 <-- guaranteed by isValid() above
+ return _planck->readObject(fields[2], field, V, s, s + n);
}
More information about the Kst
mailing list