[Kst] branches/work/kst/portto4/kst/src/datasources/ascii
Peter Kümmel
syntheticpp at gmx.net
Sun Aug 29 19:07:34 CEST 2010
SVN commit 1169553 by kuemmel:
add comment about local files, improve readability
M +9 -6 asciisource.cpp
--- branches/work/kst/portto4/kst/src/datasources/ascii/asciisource.cpp #1169552:1169553
@@ -123,6 +123,7 @@
reset();
+ // TODO only works for local files
setUpdateType(File);
_source = asciiTypeString;
@@ -232,16 +233,18 @@
_stringList = stringListFor(_filename, &_config);
}
- bool forceUpdate = false;
QFile file(_filename);
- if (openValidFile(file)) {
+ if (!openValidFile(file)) {
// Qt: If the device is closed, the size returned will not reflect the actual size of the device.
- if (_byteLength != file.size()) {
+ return NoChange;
+ }
+
+ bool forceUpdate;
+ if (_byteLength == file.size()) {
+ forceUpdate = false;
+ } else {
forceUpdate = true;
- }
_byteLength = file.size();
- } else {
- return NoChange;
}
int bufread;
More information about the Kst
mailing list