OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_dataop.cpp versions 1.21 and 1.22
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_dataop.cpp 1.21 -> 1.22

--- as_dataop.cpp        2002/12/13 20:50:18     1.21
+++ as_dataop.cpp        2002/12/13 23:42:37     1.22
@@ -295,10 +295,10 @@
     // Calculate rows to delete from selection highlight
     for (int nIter = 0; nIter < nTotal; ++nIter) {
         // Build the row data string one field at a time, adding seps inbetween
+        Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXUSER);
+        Rowdata += trUtf8(TITRAQ_SEPARATORTOK);
         Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXDATE);
         Rowdata += trUtf8(TITRAQ_SEPARATORTOK);
-    //    Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXUSER);
-    //    Rowdata += trUtf8(TITRAQ_SEPARATORTOK);
         Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXSTART);
         Rowdata += trUtf8(TITRAQ_SEPARATORTOK);
         Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXFINISH);
@@ -322,18 +322,18 @@
     int nRows = Rowdata.contains(QChar('\n'));          // Set so many rows
     int nCurrentrow = m_pMaintable->currentRow();       // Current table row
     QTableItem *pItem = NULL;                           // Old item to change out
-    QString Date, Start, Finish, Amount, Task, Remark;  // Text fields in table
+    QString User;                                       // Admin fields in table
+    QString Date, Start, Finish, Amount, Task, Remark;  // Viewable fields in table
     QTextStream Datastream(&Rowdata, IO_ReadOnly);      // Convert data to stream
 
     for (int nIter = 0; nIter < nRows; ++nIter) {
-        Datastream >> Date >> Start;                    // Stream data fields
+        Datastream >> User >> Date >> Start;            // Stream data fields
         Datastream >> Finish >> Amount >> Task;         // to corresponding vars
-        Datastream.skipWhiteSpace();                    // Remove whitespaces
         Remark = Datastream.readLine();                 // Remark is a whole line
 
         // Set the table row data one field at a time, skipping seps inbetween
+        m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXUSER, User);
         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXDATE, Date);
-//        m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXUSER, User);
         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXSTART, Start);
         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXFINISH, Finish);
         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXAMOUNT, Amount);
@@ -350,6 +350,7 @@
         m_pMaintable->setItem(nCurrentrow + nIter, TITRAQ_IDXTASK, new RtTableItem(m_pMaintable, QTableItem::WhenCurrent, Task));
 
         // Continue with field processing business as usual
+        Remark.simplifyWhiteSpace(); // First get rid of and simplify whitespace
         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXREMARK, Remark);
     }
 }

CVSTrac 2.0.1