[Kst] branches/work/kst/portto4/kst/src/datasources/ascii
Peter Kümmel
syntheticpp at gmx.net
Tue Jul 27 08:17:59 CEST 2010
SVN commit 1155268 by kuemmel:
AsciiPlugin: rescan file with new parameters
BUG: 243734
M +6 -4 asciisource.cpp
M +2 -3 asciisource.h
--- branches/work/kst/portto4/kst/src/datasources/ascii/asciisource.cpp #1155267:1155268
@@ -142,15 +142,13 @@
{
_tmpBuffer.clear();
_rowIndex.clear();
- // enable all pre-allocated memory
- _tmpBuffer.resize(_tmpBuffer.capacity());
- _rowIndex.resize(_rowIndex.capacity());
-
_valid = false;
+ _byteLength = 0;
_numFrames = 0;
_haveHeader = false;
_fieldListComplete = false;
+
_fieldList.clear();
_scalarList.clear();
_stringList.clear();
@@ -174,6 +172,8 @@
bool AsciiSource::initRowIndex()
{
+ _rowIndex.resize(_rowIndex.capacity());
+
_rowIndex[0] = 0;
_byteLength = 0;
_numFrames = 0;
@@ -584,6 +584,8 @@
void AsciiSource::parseProperties(QXmlStreamAttributes &properties)
{
_config.parseProperties(properties);
+ reset();
+ internalDataSourceUpdate();
}
--- branches/work/kst/portto4/kst/src/datasources/ascii/asciisource.h #1155267:1155268
@@ -75,12 +75,12 @@
QVarLengthArray<char, KST_PREALLOC> _tmpBuffer;
QVarLengthArray<int, KST_PREALLOC / 4> _rowIndex;
- int _numFrames;
- int _byteLength;
friend class ConfigWidgetAscii;
mutable AsciiSourceConfig _config;
+ int _numFrames;
+ int _byteLength;
bool _haveHeader;
bool _fieldListComplete;
@@ -91,7 +91,6 @@
DataInterfaceAsciiVector* iv;
bool openValidFile(QFile &file);
-
static bool openFile(QFile &file);
// TODO remove
More information about the Kst
mailing list