OSSP CVS Repository

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

ossp-pkg/as/as-gui/as_slot.cpp 1.10 -> 1.11

--- as_slot.cpp  2002/11/22 21:51:58     1.10
+++ as_slot.cpp  2002/11/24 23:11:56     1.11
@@ -70,8 +70,10 @@
         catch (Genexcept& Genex) {
             Genex.reportErr();
         }
-        setCaption(Filestring);
+        // Reset and give output to main window
+        this->setCaption(Filestring);
         m_pStatbar->message(trUtf8("Loaded document ") + Filestring, 4000);
+        this->setDirty(false);          // Set the clean state
     }
     else
         m_pStatbar->message(trUtf8("Loading aborted"), 4000);
@@ -90,21 +92,16 @@
 
     // Try to open a file for writing to
     QFile Filetemp(*m_szFilename);
-    if (!Filetemp.open(IO_WriteOnly)) {
-        m_pStatbar->message(QString(trUtf8("Could not write to %1")).arg(*m_szFilename), 4000);
-        return;
+    try {
+        saveData(Filetemp); // Pass to helper method
     }
-
-    // Serialize file contents and write to text line
-    QTextStream Filestream(&Filetemp);
-    Filestream << m_pRemark->text();
-    Filetemp.close();
-
-    // Reset the text line, and give output to main window
-    m_pRemark->setEdited(FALSE);
-    setCaption(*m_szFilename);
-    m_pStatbar->message(QString(trUtf8("File %1 saved")).arg(*m_szFilename), 4000);
-    m_bDirt = false;    // Set the clean state to allow a close operation
+    catch (Genexcept& Genex) {
+        Genex.reportErr();
+    }
+    // Reset and give output to main window
+    this->setCaption(*m_szFilename);
+    m_pStatbar->message(trUtf8("File %1 saved").arg(*m_szFilename), 4000);
+    this->setDirty(false);  // Set the clean state to allow close
 }
 
 //
@@ -154,14 +151,6 @@
 }
 
 //
-// Check to see if state has changed since last save
-//
-bool Titraqform::isDirty(void)
-{
-    return m_bDirt;
-}
-
-//
 // Edit menu cut
 //
 void Titraqform::cut(void)

CVSTrac 2.0.1