]> Git trees. - libqmvoc.git/commitdiff
More consistent use of setModified()
authorPeter Hedlund <peter@peterandlinda.com>
Thu, 21 Dec 2006 21:07:33 +0000 (21:07 +0000)
committerPeter Hedlund <peter@peterandlinda.com>
Thu, 21 Dec 2006 21:07:33 +0000 (21:07 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=615524

kdeeducore/keduvocdocument.cpp
kdeeducore/keduvocdocument.h

index 170a10d301721caa6e51d2feef76c4b089ae2e47..b8b11055b94a5a01eabe12a40c70df870e705c44 100644 (file)
@@ -273,8 +273,7 @@ bool KEduVocDocument::saveAs(QObject *parent, const KUrl & url, FileType ft, con
     }
   }
   m_url = tmp;
-  m_dirty = false;
-  emit docModified(false);
+  setModified(false);
   return true;
 }
 
@@ -1194,7 +1193,7 @@ void KEduVocDocument::shuffle()
   KRandomSequence* rs;
   rs = new KRandomSequence();
   rs->randomize(m_vocabulary);
-  m_dirty = true;
+  setModified();
 }
 
 #include "keduvocdocument.moc"
index 1a29446447a50f0aa3c8e2189ca6f03f23d2c2f3..f1fe7ba52096f26f3fe621717d094dd9aad799c6 100644 (file)
@@ -292,7 +292,7 @@ class KDEEDUCORE_EXPORT KEduVocDocument : public QObject
    * @param expression      expression to append
    */
   inline void appendEntry (KEduVocExpression *expression)
-    { m_vocabulary.append(*expression); m_dirty = true; }
+    { m_vocabulary.append(*expression); setModified(); }
 
   /**
    * Inserts a new expression
@@ -301,7 +301,7 @@ class KDEEDUCORE_EXPORT KEduVocDocument : public QObject
    * @param index           index of entry
    */
   inline void insertEntry(KEduVocExpression *expression, int index)
-    { m_vocabulary.insert(index, *expression); m_dirty = true; }
+    { m_vocabulary.insert(index, *expression); setModified(); }
 
   /**
    * Removes an expression from the document
@@ -314,7 +314,7 @@ class KDEEDUCORE_EXPORT KEduVocDocument : public QObject
    * Removes all expressions from the document (clears vocabulary)
    */
   inline void removeAllEntries()
-    { m_vocabulary.clear(); m_dirty = true; }
+    { m_vocabulary.clear(); setModified(); }
 
   /**
    * Sorts vocabulary alphabetically