From 08740be31d8c47e1bf2461f1640f4514f6c3f528 Mon Sep 17 00:00:00 2001 From: Peter Hedlund Date: Wed, 17 Jan 2007 22:33:47 +0000 Subject: [PATCH] Work on appending, assigning, and deleting languages svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=624739 --- kdeeducore/keduvocdocument.cpp | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/kdeeducore/keduvocdocument.cpp b/kdeeducore/keduvocdocument.cpp index a947b24..48f8ba4 100644 --- a/kdeeducore/keduvocdocument.cpp +++ b/kdeeducore/keduvocdocument.cpp @@ -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 -{ - -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); } } -- 2.47.3