OSSP CVS Repository

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

Check-in Number: 3970
Date: 2003-Jan-30 19:18:30 (local)
2003-Jan-30 18:18:30 (UTC)
User:ms
Branch:
Comment: Write a special version symbol when serializing data to files.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_const.h      1.39 -> 1.40     9 inserted, 4 deleted
ossp-pkg/as/as-gui/as_dataop.cpp      1.36 -> 1.37     3 inserted, 4 deleted

ossp-pkg/as/as-gui/as_const.h 1.39 -> 1.40

--- as_const.h   2003/01/30 16:51:45     1.39
+++ as_const.h   2003/01/30 18:18:30     1.40
@@ -55,10 +55,6 @@
 #define TITRAQ_PREFLOCALLOG     "loglocal"
 #define TITRAQ_DEFLOCALLOG      "no"
 
-// Environment strings
-#define TITRAQ_ENVUSERNAME      "LOGNAME"
-#define TITRAQ_ENVHOMEDIR       "HOMEDIR"
-
 // Column show preferences
 #define TITRAQ_PREFSTATCOLON    "statcolshow"
 #define TITRAQ_DEFSTATCOLON     true
@@ -134,10 +130,19 @@
 #define TITRAQ_PREFSORTDIR      "sortascending"
 #define TITRAQ_DEFSORTDIR       true
 
+// Other value constants
+#define TITRAQ_DATAVERSIONMAJ   0
+#define TITRAQ_DATAVERSIONMIN   5
+
+// Environment string constants
+#define TITRAQ_ENVUSERNAME      "LOGNAME"
+#define TITRAQ_ENVHOMEDIR       "HOMEDIR"
+
 // Other string constants
 #define TITRAQ_SEPARATORTOK     " "
 #define TITRAQ_HOMEDIRTOK       "~/"
 #define TITRAQ_FEXTENSION       ".as"
+#define TITRAQ_DATAPATTERN      "%!AS-EVENTS-"
 #define TITRAQ_SAVEFIRST        "The timesheet contains unsaved changes.\nDo you want to save the changes or discard them?"
 #define TITRAQ_OVERWRITE        "A file already exists with the chosen name.\nDo you want to overwrite it with new data?"
 


ossp-pkg/as/as-gui/as_dataop.cpp 1.36 -> 1.37

--- as_dataop.cpp        2003/01/28 17:33:55     1.36
+++ as_dataop.cpp        2003/01/30 18:18:30     1.37
@@ -329,8 +329,9 @@
     QString Strsearch;                              // String to strip search
     QRegExp Stripper("\\s*$");                      // Pattern to strip off
 
-    // Optimize viewing by repainting cells only once after processing
-    m_pMaintable->setUpdatesEnabled(false);
+    // Start by prepending the AS data format version symbol
+    Tstream << TITRAQ_DATAPATTERN << TITRAQ_DATAVERSIONMAJ
+            << QChar('.') << TITRAQ_DATAVERSIONMIN << endl;
 
     // Linewise save from the main table date, time, account, and others
     for (int nIter = 0; nIter < nRows; nIter++) {
@@ -386,8 +387,6 @@
 
         Tstream << endl;                                            // Append a newline
     }
-
-    m_pMaintable->setUpdatesEnabled(true); // Update and repaint
 }
 
 //

CVSTrac 2.0.1