OSSP CVS Repository

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

Check-in Number: 3990
Date: 2003-Feb-03 15:12:08 (local)
2003-Feb-03 14:12:08 (UTC)
User:ms
Branch:
Comment: Back out logic to recognize '-', '+', and '=' as separator symbols.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_assist.cpp      1.95 -> 1.96     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_const.h      1.44 -> 1.45     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_dataop.cpp      1.39 -> 1.40     11 inserted, 31 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.105 -> 1.106     1 inserted, 1 deleted

ossp-pkg/as/as-gui/as_assist.cpp 1.95 -> 1.96

--- as_assist.cpp        2003/02/03 11:15:48     1.95
+++ as_assist.cpp        2003/02/03 14:12:08     1.96
@@ -754,7 +754,7 @@
     // Configure attributes
     m_pDateedit->setOrder(QDateEdit::YMD);
     m_pDateedit->setAutoAdvance(true);
-    m_pDateedit->setSeparator(trUtf8("."));
+    m_pDateedit->setSeparator(trUtf8("-"));
     m_pDateedit->setEnabled(false);
 
     // Whatsthis info for the date editor


ossp-pkg/as/as-gui/as_const.h 1.44 -> 1.45

--- as_const.h   2003/02/03 10:46:13     1.44
+++ as_const.h   2003/02/03 14:12:09     1.45
@@ -102,7 +102,7 @@
 #define TITRAQ_PREFREVCOLWIDTH    "revcolwidth"
 #define TITRAQ_DEFREVCOLWIDTH     32
 #define TITRAQ_PREFDCOLWIDTH      "datecolwidth"
-#define TITRAQ_DEFDCOLWIDTH       94
+#define TITRAQ_DEFDCOLWIDTH       96
 #define TITRAQ_PREFSTARTCOLWIDTH  "startcolwidth"
 #define TITRAQ_DEFSTARTCOLWIDTH   80
 #define TITRAQ_PREFFCOLWIDTH      "finishcolwidth"


ossp-pkg/as/as-gui/as_dataop.cpp 1.39 -> 1.40

--- as_dataop.cpp        2003/01/30 20:26:03     1.39
+++ as_dataop.cpp        2003/02/03 14:12:09     1.40
@@ -139,7 +139,6 @@
     bool bValid = true; // Used to warn on globally invalid accounting data
     int nIter = 0;      // Iterator used in loop and also as a count
     QString Line;       // Used for linewise editing and whitespace eating
-    QString Parstring;  // Used to parse all extra '-' and '=' token delimiters
     QString Bitbucket;  // Used for null device until we find a better way
 
     QPixmap Statokay(s_kpcStatokay_xpm);
@@ -201,7 +200,6 @@
         bool bValid = true; // Warns on linewise invalid accounting data
         QString User, Guid, Crc, Rev;                           // Valid admin fields
         QString Date, Start, Finish, Account, Amount, Remark;   // Valid user fields
-        QString Timepack;                       // Packed start finish amount field
         QTextStream Asline(&Line, IO_ReadOnly); // Convert a single line now
 
         if (nIter % g_knBlocks == 0) // Add blocks of rows to optimize loading
@@ -237,41 +235,29 @@
 
         Asline.skipWhiteSpace();    // Remove whitespaces
         Asline >> Date;             // Copy the date field
-        if (!Date.isEmpty()) {
-            Date.insert(TITRAQ_OFFSETYEAR, QChar('.'));     // Format year
-            Date.insert(TITRAQ_OFFSETMONTH, QChar('.'));    // Format month
+        if (!Date.isEmpty())
             m_pMaintable->setText(nIter, TITRAQ_IDXDATE, Date);
-        }
         else
             bValid = false;
 
         Asline.skipWhiteSpace();    // Remove whitespaces
-        Asline >> Timepack;
-
-        // Hack to hard code regex parsing logic into the document format
-        Start = Timepack.section('-', 0, 0, QString::SectionDefault);
-        Finish = Timepack.section('-', 1, 1, QString::SectionDefault);
-        Finish = Finish.section('=', 0, 0, QString::SectionDefault);
-        Amount = Timepack.section('=', 1, 1, QString::SectionDefault);
-
-        if (!Start.isEmpty()) {                             // Write start
-            Start.insert(TITRAQ_OFFSETHOUR, QChar(':'));    // Format hour
+        Asline >> Start;            // Copy the start field
+        if (!Start.isEmpty())
             m_pMaintable->setText(nIter, TITRAQ_IDXSTART, Start);
-        }
         else
             bValid = false;
 
-        if (!Finish.isEmpty()) {                            // Write finish
-            Finish.insert(TITRAQ_OFFSETHOUR, QChar(':'));   // Format hour
+        Asline.skipWhiteSpace();    // Remove whitespaces
+        Asline >> Finish;           // Copy the finish field
+        if (!Finish.isEmpty())
             m_pMaintable->setText(nIter, TITRAQ_IDXFINISH, Finish);
-        }
         else
             bValid = false;
 
-        if (!Amount.isEmpty()) {                            // Write amount
-            Amount.insert(TITRAQ_OFFSETHOUR, QChar(':'));   // Format hour
+        Asline.skipWhiteSpace();    // Remove whitespaces
+        Asline >> Amount;           // Copy the amount field
+        if (!Amount.isEmpty())
             m_pMaintable->setText(nIter, TITRAQ_IDXAMOUNT, Amount);
-        }
         else
             bValid = false;
 
@@ -387,26 +373,20 @@
             Tstream << trUtf8(" ") << Tempfield;                    // Save rev field text
 
         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXDATE);      // Load date field text
-        Tempfield.remove(QChar('.'));
         if (Tempfield != NULL)
             Tstream << trUtf8(" ") << Tempfield;                    // Save date field text
 
         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXSTART);     // Load start field text
-        Tempfield.remove(QChar(':'));
         if (Tempfield != NULL)
             Tstream << trUtf8(" ") << Tempfield;                    // Save start field text
-        Tstream << trUtf8("-");                                     // Save start field text
 
         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXFINISH);    // Load end field text
-        Tempfield.remove(QChar(':'));
         if (Tempfield != NULL)
-            Tstream << Tempfield;                                   // Save end field text
-        Tstream << trUtf8("=");                                     // Save start field text
+            Tstream << trUtf8(" ") << Tempfield;                    // Save end field text
 
         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXAMOUNT);    // Load amount field text
-        Tempfield.remove(QChar(':'));
         if (Tempfield != NULL)
-            Tstream << Tempfield;                                   // Save amount field text
+            Tstream << trUtf8(" ") << Tempfield;                    // Save amount
 
         Tempfield = m_pMaintable->text(nIter, TITRAQ_IDXTASK);      // Load acct field text
         if (Tempfield != NULL)


ossp-pkg/as/as-gui/as_slot.cpp 1.105 -> 1.106

--- as_slot.cpp  2003/02/03 11:04:23     1.105
+++ as_slot.cpp  2003/02/03 14:12:09     1.106
@@ -962,7 +962,7 @@
 //
 void Titraqform::updateDate(const QDate &Dateup)
 {
-        m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXDATE, Dateup.toString("yyyy.MM.dd"));
+        m_pMaintable->setText(m_pMaintable->currentRow(), TITRAQ_IDXDATE, Dateup.toString(Qt::ISODate));
 }
 
 //

CVSTrac 2.0.1