OSSP CVS Repository

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

Check-in Number: 3880
Date: 2002-Dec-16 11:45:25 (local)
2002-Dec-16 10:45:25 (UTC)
User:ms
Branch:
Comment: Implement missing logic for remaining new field linewise load and save ops.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_dataop.cpp      1.23 -> 1.24     16 inserted, 4 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.61 -> 1.62     6 inserted, 0 deleted

ossp-pkg/as/as-gui/as_dataop.cpp 1.23 -> 1.24

--- as_dataop.cpp        2002/12/16 09:58:34     1.23
+++ as_dataop.cpp        2002/12/16 10:45:25     1.24
@@ -295,8 +295,16 @@
     // 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_IDXLINE);
+        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_IDXGUID);
+        Rowdata += trUtf8(TITRAQ_SEPARATORTOK);
+        Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXCRC);
+        Rowdata += trUtf8(TITRAQ_SEPARATORTOK);
+        Rowdata += m_pMaintable->text(Select.topRow() + nIter, TITRAQ_IDXREV);
+        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_IDXSTART);
@@ -322,17 +330,21 @@
     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 User;                                       // Admin fields in table
+    QString Line, User, Guid, Crc, Rev;                 // 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 >> User >> Date >> Start;            // Stream data fields
-        Datastream >> Finish >> Amount >> Task;         // to corresponding vars
-        Remark = Datastream.readLine();                 // Remark is a whole line
+        Datastream >> Line >> User >> Guid >> Crc >> Rev;        // Stream data fields
+        Datastream >> Date >> Start >> Finish >> Amount >> Task; // to corresponding vars
+        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_IDXLINE, Line);
         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXUSER, User);
+        m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXGUID, Guid);
+        m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXCRC, Crc);
+        m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXREV, Rev);
         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXDATE, Date);
         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXSTART, Start);
         m_pMaintable->setText(nCurrentrow + nIter, TITRAQ_IDXFINISH, Finish);


ossp-pkg/as/as-gui/as_slot.cpp 1.61 -> 1.62

--- as_slot.cpp  2002/12/13 23:42:37     1.61
+++ as_slot.cpp  2002/12/16 10:45:25     1.62
@@ -92,6 +92,12 @@
         nRows = Selection.contains(QChar('\n'));    // How many rows
         this->addEntry(nRows);                      // Reuse slot
         setRowdata(Selection);                      // Use accessor
+
+        // Update line numbers for this new row and all subsequent rows
+        for (int nIter = m_pMaintable->currentRow(); nIter < m_pMaintable->numRows(); nIter++)
+            m_pMaintable->setText(nIter, TITRAQ_IDXLINE, QString::number(nIter).rightJustify(4, QChar('0')));
+
+        // Do basic data validation to warn against missing fields
         for (int nIter = 0; nIter <= nRows; nIter++)
             this->validateData(m_pMaintable->currentRow() + nIter, 0);
     }

CVSTrac 2.0.1