[Kst] branches/work/kst/portto4/kst/src/datasources/ascii

Peter Kümmel syntheticpp at gmx.net
Mon Oct 22 10:11:07 UTC 2012


SVN commit 1321912 by kuemmel:

_byteLength is the file size

 M  +6 -6      asciisource.cpp  
 M  +1 -1      asciisource.h  


--- branches/work/kst/portto4/kst/src/datasources/ascii/asciisource.cpp #1321911:1321912
@@ -92,7 +92,7 @@
   _haveWarned = false;
 
   _valid = false;
-  _byteLength = 0;
+  _fileSize = 0;
   _haveHeader = false;
   _fieldListComplete = false;
   
@@ -109,7 +109,7 @@
 bool AsciiSource::initRowIndex() 
 {
   _reader.clear();
-  _byteLength = 0;
+  _fileSize = 0;
   
   if (_config._dataLine > 0) {
     QFile file(_filename);
@@ -183,12 +183,12 @@
   }
   
   bool force_update = true;
-  if (_byteLength == file.size()) {
+  if (_fileSize == file.size()) {
     force_update = false;
   }
-  _byteLength = file.size();
+  _fileSize = file.size();
   
-  bool new_data = _reader.findDataRows(read_completely, file, _byteLength);
+  bool new_data = _reader.findDataRows(read_completely, file, _fileSize);
   
   return (!new_data && !force_update ? NoChange : Updated);
 }
@@ -253,7 +253,7 @@
 bool AsciiSource::useThreads() const
 {
   // only use threads for files > 1 MB
-  return _config._useThreads && _byteLength > 1 * 1024 * 1024;
+  return _config._useThreads && _fileSize > 1 * 1024 * 1024;
 }
 
 
--- branches/work/kst/portto4/kst/src/datasources/ascii/asciisource.h #1321911:1321912
@@ -73,7 +73,7 @@
     friend class AsciiConfigWidget;
     mutable AsciiSourceConfig _config;
 
-    int _byteLength;
+    int _fileSize;
     bool _haveHeader;
     bool _fieldListComplete;
     bool _haveWarned;


More information about the Kst mailing list