[Kst] branches/work/kst/1.5/kst/src/datasources/scuba2

Andrew Walker arwalker at sumusltd.com
Fri Sep 21 20:30:17 CEST 2007


SVN commit 715290 by arwalker:

are no longer assured that the first line is <HEADER>

 M  +7 -1      scuba.cpp  


--- branches/work/kst/1.5/kst/src/datasources/scuba2/scuba.cpp #715289:715290
@@ -2002,9 +2002,15 @@
         QString s;
 
         if (frun.open(IO_ReadOnly)) {
-          if (frun.readLine(s, 10) >= 0) {
+          //
+          // we are not guaranteed that the HEADER tag is the first entry so
+          //  search the entire file for it...
+          //
+          while (frun.readLine(s, 10) >= 0) {
             if (s.stripWhiteSpace().upper().compare(BEGIN_HEADER_2) == 0) {
               retVal = 100;
+
+              break;
             }
           }
           frun.close();


More information about the Kst mailing list