]> Git trees. - libqmvoc.git/commitdiff
Work on appending, assigning, and deleting languages
authorPeter Hedlund <peter@peterandlinda.com>
Wed, 17 Jan 2007 22:33:47 +0000 (22:33 +0000)
committerPeter Hedlund <peter@peterandlinda.com>
Wed, 17 Jan 2007 22:33:47 +0000 (22:33 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=624739

kdeeducore/keduvocdocument.cpp

index a947b24fc15cd42cb1f4efcce5edf84d6ebbe0e2..48f8ba42155fb873d407395ffde20fe57051f3b4 100644 (file)
@@ -39,8 +39,9 @@
 //  KEduVocDocument
 //********************************************************
 
-KEduVocDocument::KEduVocDocument(QObject */*parent*/)
+KEduVocDocument::KEduVocDocument(QObject *parent)
 {
+  Q_UNUSED(parent);
   Init();
 }
 
@@ -473,32 +474,14 @@ void KEduVocDocument::setSizeHint (int idx, const int width)
   }
 }
 
-/*
-class eraseTrans : public unary_function<KEduVocExpression, void>
-{
-
-public:
-
-  eraseTrans (int idx)
-    : index (idx) {}
-
-  void operator() (KEduVocExpression& x) const
-    {
-      x.removeTranslation(index);
-    }
-
- private:
-    int index;
-};
-*/
 
 void KEduVocDocument::removeIdentifier(int index)
 {
   if (index < (int)m_identifiers.size() && index >= 1 )
   {
     m_identifiers.removeAt(index);
-    foreach( KEduVocExpression exp, m_vocabulary )
-      exp.removeTranslation(index);
+    for (int i = 0; i < m_vocabulary.count(); i++)
+      m_vocabulary[i].removeTranslation(index);
   }
 }