[Kst] branches/work/kst/portto4/kst/src/datasources/dirfile
George Staikos
staikos at kde.org
Thu Feb 22 23:49:40 CET 2007
SVN commit 636376 by staikos:
dirfile is ported
M +2 -2 CMakeLists.txt
M +9 -9 dirfile.cpp
--- branches/work/kst/portto4/kst/src/datasources/dirfile/CMakeLists.txt #636375:636376
@@ -1,5 +1,5 @@
-include_directories( ${CMAKE_SOURCE_DIR}/kst/src/libkst ${CMAKE_SOURCE_DIR}/kst/src/extdate ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
+include_directories( ${CMAKE_SOURCE_DIR}/src/libkst ${CMAKE_SOURCE_DIR}/src/extdate ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
########### next target ###############
@@ -10,7 +10,7 @@
kde4_add_plugin(kstdata_dirfile ${kstdata_dirfile_PART_SRCS})
-target_link_libraries(kstdata_dirfile ${KDE4_KDECORE_LIBS} )
+target_link_libraries(kstdata_dirfile ${KDE4_KDECORE_LIBS} kst)
install(TARGETS kstdata_dirfile DESTINATION ${PLUGIN_INSTALL_DIR} )
--- branches/work/kst/portto4/kst/src/datasources/dirfile/dirfile.cpp #636375:636376
@@ -43,7 +43,7 @@
int err = 0;
_frameCount = 0;
- FormatType *ft = GetFormat(_filename.latin1(), &err);
+ FormatType *ft = GetFormat(_filename.toLatin1(), &err);
if (err == GD_E_OK) {
_fieldList.append("INDEX");
@@ -83,7 +83,7 @@
}
int err = 0;
- int newNF = GetNFrames(_filename.latin1(), &err, 0L);
+ int newNF = GetNFrames(_filename.toLatin1(), &err, 0L);
bool isnew = newNF != _frameCount;
_frameCount = newNF;
@@ -97,13 +97,13 @@
int err = 0;
if (n < 0) {
- return GetData(_filename.latin1(), field.left(FIELD_LENGTH).latin1(),
+ return GetData(_filename.toLatin1(), field.left(FIELD_LENGTH).toLatin1(),
s, 0, /* 1st sframe, 1st samp */
0, 1, /* num sframes, num samps */
'd', (void*)v,
&err);
} else {
- return GetData(_filename.latin1(), field.left(FIELD_LENGTH).latin1(),
+ return GetData(_filename.toLatin1(), field.left(FIELD_LENGTH).toLatin1(),
s, 0, /* 1st sframe, 1st samp */
n, 0, /* num sframes, num samps */
'd', (void*)v,
@@ -115,7 +115,7 @@
int DirFileSource::writeField(const double *v, const QString& field, int s, int n) {
int err = 0;
- return PutData(_filename.latin1(), field.left(FIELD_LENGTH).latin1(),
+ return PutData(_filename.toLatin1(), field.left(FIELD_LENGTH).toLatin1(),
s, 0, /* 1st sframe, 1st samp */
n, 0, /* num sframes, num samps */
'd', (void*)v,
@@ -125,14 +125,14 @@
bool DirFileSource::isValidField(const QString& field) const {
int err = 0;
- GetSamplesPerFrame(_filename.latin1(), field.left(FIELD_LENGTH).latin1(), &err);
+ GetSamplesPerFrame(_filename.toLatin1(), field.left(FIELD_LENGTH).toLatin1(), &err);
return err == 0;
}
int DirFileSource::samplesPerFrame(const QString &field) {
int err = 0;
- return GetSamplesPerFrame(_filename.latin1(), field.left(FIELD_LENGTH).latin1(), &err);
+ return GetSamplesPerFrame(_filename.toLatin1(), field.left(FIELD_LENGTH).toLatin1(), &err);
}
@@ -173,7 +173,7 @@
// FIXME: GetNFrames causes a memory error here. I think it is due to
// the lfilename parameter.
int err = 0;
- int frameCount = GetNFrames(filename.latin1(), &err, 0L);
+ int frameCount = GetNFrames(filename.toLatin1(), &err, 0L);
if (frameCount > 0 && err == GD_E_OK) {
return 98;
}
@@ -186,7 +186,7 @@
QStringList fieldList_dirfile(KConfig*, const QString& filename, const QString& type, QString *typeSuggestion, bool *complete) {
Q_UNUSED(type)
int err = 0;
- struct FormatType *ft = GetFormat(filename.latin1(), &err);
+ struct FormatType *ft = GetFormat(filename.toLatin1(), &err);
QStringList fieldList;
if (complete) {
More information about the Kst
mailing list