OSSP CVS Repository

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

ossp-pkg/as/as-gui/as_slot.cpp 1.115 -> 1.116

--- as_slot.cpp  2003/02/07 16:37:55     1.115
+++ as_slot.cpp  2003/02/08 18:10:09     1.116
@@ -46,8 +46,9 @@
 #include "as_generic.h"         // Generic classes
 #include "as_uuid.h"            // UUID classes
 #include "as_datedit.h"         // Derived from QDateEdit
-#include "as_crc.h"             // Useful qualistring class
-#include "as_panel.h"           // For prefpanel class
+#include "as_crc.h"             // Useful Qualistring class
+#include "as_panel.h"           // For Prefpanel class
+#include "as_sfile.h"           // For Simplefile class
 
 // RPC headers
 #ifdef HAVE_ESOAP
@@ -431,8 +432,7 @@
 void Titraqform::saveFile(void)
 {
     QString Fname;
-    QFile Filevents, Filebak;
-    QTextStream Streamevents, Streambak;
+    Simplefile Filevents;
 
     try {
         Fname = *this->getFilename();
@@ -449,21 +449,9 @@
             }
         }
 
-        Filevents.setName(Fname); // Construct a file to back up and write
-
-        // Make a backup before overwriting
-        if (Filevents.exists()) {
-            Filevents.open(IO_ReadOnly);
-            Filebak.setName(Fname + ".bak");
-            Filebak.open(IO_WriteOnly);
-            Streamevents.setDevice(&Filevents);
-            Streambak.setDevice(&Filebak);
-            Streambak << Streamevents.read();
-            Filevents.close();
-            Filebak.close();
-        }
-
-        this->saveData(Filevents); // Pass to helper method
+        Filevents.setName(Fname);   // Construct a file to write
+        Filevents.makeBackup();     // Back up to filename.bak
+        this->saveData(Filevents);  // Pass to helper method
     }
     catch (Genexcept& Genex) {
         Genex.reportErr();

CVSTrac 2.0.1