From 4438ae3ee489f9e0879be653ed38c9c9d1470ca7 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Sat, 26 Apr 2008 14:57:37 +0000 Subject: [PATCH] Massively fix conjugations - writing would bork them. svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=801407 --- keduvocdocument/keduvoccontainer.cpp | 2 -- keduvocdocument/keduvockvtml2reader.h | 8 -------- keduvocdocument/keduvoctranslation.cpp | 5 ++--- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/keduvocdocument/keduvoccontainer.cpp b/keduvocdocument/keduvoccontainer.cpp index dd90331..1c4cc55 100644 --- a/keduvocdocument/keduvoccontainer.cpp +++ b/keduvocdocument/keduvoccontainer.cpp @@ -214,7 +214,6 @@ void KEduVocContainer::insertChildContainer(int row, KEduVocContainer * child) void KEduVocContainer::updateChildLessonEntries() { - kDebug() << "updateChildLessonEntries: " << name(); QList < KEduVocExpression* > entriesRecursive = entries(); foreach(KEduVocContainer *childContainer, d->m_childContainers) @@ -227,7 +226,6 @@ void KEduVocContainer::updateChildLessonEntries() void KEduVocContainer::invalidateChildLessonEntries() { - kDebug() << "invalidateChildLessonEntries: " << name(); d->m_childLessonEntriesValid = false; // propagate to parent if (d->m_parentContainer) { diff --git a/keduvocdocument/keduvockvtml2reader.h b/keduvocdocument/keduvockvtml2reader.h index c0947c5..f7bdcbf 100644 --- a/keduvocdocument/keduvockvtml2reader.h +++ b/keduvocdocument/keduvockvtml2reader.h @@ -79,14 +79,6 @@ private: bool readPersonalPronounChild(QDomElement & personElement, KEduVocPersonalPronoun & pronoun, KEduVocConjugation::ConjugationNumber number); - - /** read in a conjugation - * @param conjugElement QDomElement for the conjugation group - * @param curr_conjug conjugation object to populate - */ - bool readConjugation( QDomElement &conjugElement, KEduVocConjugation &conjugation ); - bool readConjugationPerson( QDomElement &personElement, KEduVocConjugation &conjugation, KEduVocConjugation::ConjugationNumber number ); - /** read the types * @param typesElement QDomElement for the types group */ diff --git a/keduvocdocument/keduvoctranslation.cpp b/keduvocdocument/keduvoctranslation.cpp index 7a3f695..b2dd481 100644 --- a/keduvocdocument/keduvoctranslation.cpp +++ b/keduvocdocument/keduvoctranslation.cpp @@ -386,11 +386,9 @@ void KEduVocTranslation::toKVTML2(QDomElement & parent) } // conjugation - QDomElement conjugationElement = parent.ownerDocument().createElement( KVTML_CONJUGATION ); foreach ( const QString &tense, conjugationTenses() ) { + QDomElement conjugationElement = parent.ownerDocument().createElement( KVTML_CONJUGATION ); conjugation(tense).toKVTML2(conjugationElement, tense); - } - if (conjugationElement.hasChildNodes()) { parent.appendChild( conjugationElement ); } @@ -431,6 +429,7 @@ void KEduVocTranslation::fromKVTML2(QDomElement & parent) while ( !conjugationElement.isNull() ) { QDomElement tenseElement = conjugationElement.firstChildElement( KVTML_TENSE ); QString tense = tenseElement.text(); +kDebug() << "Read Conjugation: " << text() << tenseElement.text(); KEduVocConjugation *conjugation = KEduVocConjugation::fromKVTML2(conjugationElement); setConjugation(tense, *conjugation); delete conjugation; -- 2.47.3