OSSP CVS Repository

ossp - Check-in [3843]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3843
Date: 2002-Dec-05 13:37:18 (local)
2002-Dec-05 12:37:18 (UTC)
User:ms
Branch:
Comment: Improve line handling on data load.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_dataop.cpp      1.14 -> 1.15     8 inserted, 4 deleted

ossp-pkg/as/as-gui/as_dataop.cpp 1.14 -> 1.15

--- as_dataop.cpp        2002/12/04 19:57:11     1.14
+++ as_dataop.cpp        2002/12/05 12:37:18     1.15
@@ -126,11 +126,15 @@
         if (Remark != NULL)
             m_pMaintable->setText(nIter, TITRAQ_IDXREMARK, Remark);
 
-        nIter++;    // The big increment
-        Line = "";  // Clear line for next round
+        nIter++;            // The big increment
+        Line = trUtf8("");  // Clear line for next round
 
-        while (Line.isEmpty() && !Tstream.atEnd())  // Strip and get
-            Line = Tstream.readLine();              // the new line
+        while (Line.isEmpty() && !Tstream.atEnd()) {    // Strip and get
+            Tstream.skipWhiteSpace();                   // Remove white
+            Line = Tstream.readLine();                  // the new line
+            if (Line.at(0) == QChar('#'))               // Remove comments
+                Line = trUtf8("");
+        }
     }
 
     m_pMaintable->setUpdatesEnabled(true);      // Update and repaint

CVSTrac 2.0.1