From 801d944704c195ddac49b2491b4e51ef96b0c97e Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 31 Aug 2007 12:50:30 +0000 Subject: [PATCH] Enable reading of conjugations (read the right tag - KVTML_TENSE, not type-something). svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=706852 --- keduvocdocument/keduvockvtml2reader.cpp | 40 +++++++++++-------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/keduvocdocument/keduvockvtml2reader.cpp b/keduvocdocument/keduvockvtml2reader.cpp index 1fbdb3a..8fc36d6 100644 --- a/keduvocdocument/keduvockvtml2reader.cpp +++ b/keduvocdocument/keduvockvtml2reader.cpp @@ -548,8 +548,7 @@ bool KEduVocKvtml2Reader::readArticle( QDomElement &articleElement, int identifi bool KEduVocKvtml2Reader::readConjugation( QDomElement &conjugElement, KEduVocConjugation &curr_conjug ) /* - 1 - regular + Futurepastperfekt:) @@ -581,16 +580,11 @@ bool KEduVocKvtml2Reader::readConjugation( QDomElement &conjugElement, KEduVocCo QString plurthirdmale; QString plurthirdfemale; QString plurthirdneutral; - QString type; - - QDomElement typeElement = conjugElement.firstChildElement( KVTML_CONJUGATIONTYPE ); - if ( !typeElement.isNull() ) - { - type = typeElement.text(); - } - - // TODO: add something here to link and/or store tense information + QString tense; + QDomElement tenseElement = conjugElement.firstChildElement( KVTML_TENSE ); + tense = tenseElement.text(); +kDebug() << "Reading conjugation for tense: " << tense; QDomElement currentGroup = conjugElement.firstChildElement( KVTML_SINGULAR ); if ( !currentGroup.isNull() ) { @@ -675,18 +669,18 @@ bool KEduVocKvtml2Reader::readConjugation( QDomElement &conjugElement, KEduVocCo } } - curr_conjug.setPers3SingularCommon( type, s3_common ); - curr_conjug.setPers3PluralCommon( type, p3_common ); - curr_conjug.setPers1Singular( type, singfirst ); - curr_conjug.setPers2Singular( type, singsecond ); - curr_conjug.setPers3FemaleSingular( type, singthirdfemale ); - curr_conjug.setPers3MaleSingular( type, singthirdmale ); - curr_conjug.setPers3NaturalSingular( type, singthirdneutral ); - curr_conjug.setPers1Plural( type, plurfirst ); - curr_conjug.setPers2Plural( type, plursecond ); - curr_conjug.setPers3FemalePlural( type, plurthirdfemale ); - curr_conjug.setPers3MalePlural( type, plurthirdmale ); - curr_conjug.setPers3NaturalPlural( type, plurthirdneutral ); + curr_conjug.setPers3SingularCommon( tense, s3_common ); + curr_conjug.setPers3PluralCommon( tense, p3_common ); + curr_conjug.setPers1Singular( tense, singfirst ); + curr_conjug.setPers2Singular( tense, singsecond ); + curr_conjug.setPers3FemaleSingular( tense, singthirdfemale ); + curr_conjug.setPers3MaleSingular( tense, singthirdmale ); + curr_conjug.setPers3NaturalSingular( tense, singthirdneutral ); + curr_conjug.setPers1Plural( tense, plurfirst ); + curr_conjug.setPers2Plural( tense, plursecond ); + curr_conjug.setPers3FemalePlural( tense, plurthirdfemale ); + curr_conjug.setPers3MalePlural( tense, plurthirdmale ); + curr_conjug.setPers3NaturalPlural( tense, plurthirdneutral ); return true; } -- 2.47.3