]> Git trees. - libqmvoc.git/commitdiff
Redo of the lib. Merge of the 4.1 branch to trunk.
authorFrederik Gladhorn <gladhorn@kde.org>
Sat, 5 Jan 2008 22:21:09 +0000 (22:21 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Sat, 5 Jan 2008 22:21:09 +0000 (22:21 +0000)
This is a rather big change, which affects the apps using libkdeedu.
I guess there are quite a few bugs left. So far I know the destructor of
either expression or translation sometimes seems to double delete. Need
to look into that.
Start an experimental new practice app that is independend of the main
app. Still hardly anything implemented there.
FEATURE: Parley: New main window gui using dock windows. The edit entry
dialog does no longer exist. It is much nicer to edit vocabulary now.

Ported KHangMan, KAnagram, KWordQuiz and Parley

Notes:
-Containers: There are two subclasses for KEduVocContainer.
KEduVocLesson and KEduVocWordType. This is very benificial as from now
on, I can use the same models/views for both in parley. Leitner boxes
are also easy to realize subclassing the containers.
-The KEduVocDocument class was huge and contained some functions
specific to expression handling. This redundand api has been removed.
  instead the document now contains one root lesson
(KEduVocDocument::lesson()) to manage all entries. This lesson can
contain entries directly as well as child lessons. This makes it easy to
access all vocabulary entries by using doc->lesson()->entriesRecursive()
which collects all entries including those from sublessons.
-Lessons and word types are now able to contain child lessons/word types
to an arbitrary depth.
-Entries can be in multiple lessons.
-Expression->translation() now returns a pointer. This is more
consistent and avoids some reference trouble. In general now everything
is a pointer (containers also).
-KWordQuiz now saves the size hints per document in the kconfig. This
could also be used for cell heights.
-KWordQuiz only edits entries in the top level lesson. I'll change it to
use all entries in the document.
-Statistics in Parley are disabled for now, needs to be rewritten.
-Usages have been removed completely.
-Comparison forms do no longer have a proper class but only two strings.
Eventually it should be considered making them a class to support
male/female again. The base form should always be the adjective/adverb
itself.

I hope everything works, but I must have missed something. Bug me.

CCMAIL: peter@peterandlinda.com

svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=757794

12 files changed:
1  2 
keduvocdocument/keduvoccsvreader.cpp
keduvocdocument/keduvocgrammar.cpp
keduvocdocument/keduvocgrammar.h
keduvocdocument/keduvockvtml2reader.cpp
keduvocdocument/keduvockvtml2reader.h
keduvocdocument/keduvockvtmlreader.cpp
keduvocdocument/keduvoclesson.cpp
keduvocdocument/keduvoclesson.h
keduvocdocument/keduvocpaukerreader.cpp
keduvocdocument/keduvocvokabelnreader.cpp
keduvocdocument/keduvocwqlreader.cpp
keduvocdocument/keduvocxdxfreader.cpp

index 232669e7d8615e9bdb74af92c9ca940b835b03d6,9ab5913508e1430d547eb6a3f8658e599dafeddd..a30827a2bbdac95234827a33c5d620198dcaa102
@@@ -59,8 -63,9 +63,9 @@@ bool KEduVocCsvReader::readDoc( KEduVoc
  
          if ( !s.simplified().isEmpty() ) {
              KEduVocExpression expression( s.split(separator) );
-             languageCount = qMax( languageCount, expression.translationIndices().count() );
-             m_doc->appendEntry( &expression );
+             languageCount = qMax( languageCount,
+                 expression.translationIndices().count() );
 -            lesson->addEntry( &expression );
++            lesson->appendEntry( &expression );
          }
      }
  
index 268947dc27914c98af68a2f070b606ef13e3cdb9,7f68b824ed37d1dd9ab07ea3c44b5a13fc8a2b58..51fa2bf84e534373355d196b74ebce03329b216c
  
  #include <QtCore/QMap>
  #include <KDebug>
 -/*
 -class KEduVocComparison::Private
 -{
 -public:
 -    QString ls1;
 -    QString ls2;
 -    QString ls3;
 -};
 -
 -KEduVocComparison::KEduVocComparison()
 -        : d( new Private )
 -{}
 -
 -KEduVocComparison::KEduVocComparison( const KEduVocComparison &other )
 -        : d( new Private )
 -{
 -    setL1( other.l1() );
 -    setL2( other.l2() );
 -    setL3( other.l3() );
 -}
 -
 -KEduVocComparison::KEduVocComparison( const QString &l1, const QString &l2, const QString &l3 )
 -        : d( new Private )
 -{
 -    setL1( l1 );
 -    setL2( l2 );
 -    setL3( l3 );
 -}
 -
 -KEduVocComparison::~KEduVocComparison()
 -{
 -    delete d;
 -}
 -
 -KEduVocComparison &KEduVocComparison::operator= ( const KEduVocComparison& other )
 -{
 -    setL1( other.l1() );
 -    setL2( other.l2() );
 -    setL3( other.l3() );
 -
 -    return *this;
 -}
 -
 -bool KEduVocComparison::isEmpty() const
 -{
 -    return d->ls1.simplified().isEmpty() && d->ls2.simplified().isEmpty() && d->ls3.simplified().isEmpty();
 -}
 -
 -
 -void KEduVocComparison::clear()
 -{
 -    d->ls1 = "";
 -    d->ls2 = "";
 -    d->ls3 = "";
 -}
 -
 -bool KEduVocComparison::operator == ( const KEduVocComparison& a ) const
 -{
 -    return ( d->ls1 == a.l1() && d->ls2 == a.l2() && d->ls3 == a.l3() );
 -}
 -
 -void KEduVocComparison::setL1( const QString &s )
 -{
 -    d->ls1 = s;
 -}
 -
 -void KEduVocComparison::setL2( const QString &s )
 -{
 -    d->ls2 = s;
 -}
 -
 -void KEduVocComparison::setL3( const QString &s )
 -{
 -    d->ls3 = s;
 -}
 -
 -QString KEduVocComparison::l1() const
 -{
 -    return d->ls1;
 -}
 -QString KEduVocComparison::l2() const
 -{
 -    return d->ls2;
 -}
 -
 -QString KEduVocComparison::l3() const
 -{
 -    return d->ls3;
 -}
 -*/
 -
 -
 -
 -//=================================================================
  
- class KEduVocComparison::Private
- {
- public:
-     QString ls1;
-     QString ls2;
-     QString ls3;
- };
- KEduVocComparison::KEduVocComparison()
-         : d( new Private )
- {}
- KEduVocComparison::KEduVocComparison( const KEduVocComparison &other )
-         : d( new Private )
- {
-     setL1( other.l1() );
-     setL2( other.l2() );
-     setL3( other.l3() );
- }
- KEduVocComparison::KEduVocComparison( const QString &l1, const QString &l2, const QString &l3 )
-         : d( new Private )
- {
-     setL1( l1 );
-     setL2( l2 );
-     setL3( l3 );
- }
- KEduVocComparison::~KEduVocComparison()
- {
-     delete d;
- }
- KEduVocComparison &KEduVocComparison::operator= ( const KEduVocComparison& other )
- {
-     setL1( other.l1() );
-     setL2( other.l2() );
-     setL3( other.l3() );
-     return *this;
- }
- bool KEduVocComparison::isEmpty() const
- {
-     return d->ls1.simplified().isEmpty() && d->ls2.simplified().isEmpty() && d->ls3.simplified().isEmpty();
- }
- void KEduVocComparison::clear()
- {
-     d->ls1 = "";
-     d->ls2 = "";
-     d->ls3 = "";
- }
- bool KEduVocComparison::operator == ( const KEduVocComparison& a ) const
- {
-     return ( d->ls1 == a.l1() && d->ls2 == a.l2() && d->ls3 == a.l3() );
- }
- void KEduVocComparison::setL1( const QString &s )
- {
-     d->ls1 = s;
- }
- void KEduVocComparison::setL2( const QString &s )
- {
-     d->ls2 = s;
- }
- void KEduVocComparison::setL3( const QString &s )
- {
-     d->ls3 = s;
- }
- QString KEduVocComparison::l1() const
- {
-     return d->ls1;
- }
- QString KEduVocComparison::l2() const
- {
-     return d->ls2;
- }
- QString KEduVocComparison::l3() const
- {
-     return d->ls3;
- }
- //=================================================================
  class KEduVocArticle::Private
  {
  public:
index ba601444d6a98b9f5befd07aa7355165c9bf8ff0,b3135766c6ff32a2404dfb46b93e0a7c5e807ece..d1a0b60c427525f0b96cf7df0f1087b2fb3d4fde
@@@ -110,85 -110,85 +110,4 @@@ private
  };
  
  
- class KEDUVOCDOCUMENT_EXPORT KEduVocComparison
- {
- public:
-     /**
-      * The constructor without arguments
-      */
-     explicit KEduVocComparison();
-     /** copy constructor
-      * @param other comparison object to copy
-      */
-     KEduVocComparison( const KEduVocComparison &other );
-     /**
-      * The constructor with arguments
-      * @param l1
-      * @param l2
-      * @param l3
-      */
-     KEduVocComparison( const QString &l1, const QString &l2, const QString &l3 );
-     /** default destructor, deletes the d-pointer */
-     ~KEduVocComparison();
-     /** set the first comparison
-      @param s value to set
-      */
-     void setL1( const QString &s );
-     /** set the second comparison
-      @param s value to set
-      */
-     void setL2( const QString &s );
-     /** set the third comparison
-      @param s value to set
-      */
-     void setL3( const QString &s );
-     /** get the first comparison
-      * @returns the first comparison
-      */
-     QString l1() const;
-     /** get the second comparison
-      * @returns the second comparison
-      */
-     QString l2() const;
-     /** get the third comparison
-      * @returns the third comparison
-      */
-     QString l3() const;
-     /** is the comparison empty
-      * @returns true if empty, false otherwise
-      */
-     bool isEmpty() const;
-     /** clear the comparison */
-     void clear();
-     /** equality operator
-      * @param a object to compare to
-      * @returns true if comparisons are the same, false otherwise
-      */
-     bool operator == ( const KEduVocComparison& a ) const;
-     /** assignment operator for d-pointer copying
-      * @param other object to copy from
-      * @returns reference to this object
-      */
-     KEduVocComparison &operator= ( const KEduVocComparison& other );
- private:
-     class Private;
-     Private * const d;
- };
 -// class KEDUVOCDOCUMENT_EXPORT KEduVocComparison
 -// {
 -// public:
 -// 
 -//     /**
 -//      * The constructor without arguments
 -//      */
 -//     explicit KEduVocComparison();
 -// 
 -//     /** copy constructor
 -//      * @param other comparison object to copy
 -//      */
 -//     KEduVocComparison( const KEduVocComparison &other );
 -// 
 -//     /**
 -//      * The constructor with arguments
 -//      * @param l1
 -//      * @param l2
 -//      * @param l3
 -//      */
 -//     KEduVocComparison( const QString &l1, const QString &l2, const QString &l3 );
 -// 
 -//     /** default destructor, deletes the d-pointer */
 -//     ~KEduVocComparison();
 -// 
 -//     /** set the first comparison
 -//      @param s value to set
 -//      */
 -//     void setL1( const QString &s );
 -// 
 -//     /** set the second comparison
 -//      @param s value to set
 -//      */
 -//     void setL2( const QString &s );
 -// 
 -//     /** set the third comparison
 -//      @param s value to set
 -//      */
 -//     void setL3( const QString &s );
 -// 
 -//     /** get the first comparison
 -//      * @returns the first comparison
 -//      */
 -//     QString l1() const;
 -// 
 -//     /** get the second comparison
 -//      * @returns the second comparison
 -//      */
 -//     QString l2() const;
 -// 
 -//     /** get the third comparison
 -//      * @returns the third comparison
 -//      */
 -//     QString l3() const;
 -// 
 -//     /** is the comparison empty
 -//      * @returns true if empty, false otherwise
 -//      */
 -//     bool isEmpty() const;
 -// 
 -//     /** clear the comparison */
 -//     void clear();
 -// 
 -//     /** equality operator
 -//      * @param a object to compare to
 -//      * @returns true if comparisons are the same, false otherwise
 -//      */
 -//     bool operator == ( const KEduVocComparison& a ) const;
 -// 
 -//     /** assignment operator for d-pointer copying
 -//      * @param other object to copy from
 -//      * @returns reference to this object
 -//      */
 -//     KEduVocComparison &operator= ( const KEduVocComparison& other );
 -// 
 -// private:
 -//     class Private;
 -//     Private * const d;
 -// };
--
--
  #endif // KEDUVOCGRAMMAR_H
index 9d0c39de686d22ace524f624a96539a7e0419f50,be0331d28afc43bf0d21a3e3467701c06aace9c9..444e8736bcb7b544cb4c7fd304c3a11eda45437b
@@@ -189,27 -184,25 +184,25 @@@ bool KEduVocKvtml2Reader::readGroups( Q
  
      groupElement = domElementParent.firstChildElement( KVTML_LESSONS );
      if ( !groupElement.isNull() ) {
-         QDomNodeList entryList = groupElement.elementsByTagName( KVTML_CONTAINER );
-         for ( int i = 0; i < entryList.count(); ++i ) {
-             currentElement = entryList.item( i ).toElement();
-             if ( currentElement.parentNode() == groupElement ) {
-                 result = readLesson( currentElement );
-                 if ( !result )
-                     return false;
-             }
-         }
+         readChildLessons(m_doc->lesson(), groupElement);
+     }
  
-         ///@todo past 4.0: remove reading "lesson" it was only for compability with documents created during the beta for KDE 4.0
-         entryList = groupElement.elementsByTagName( "lesson" );
-         for ( int i = 0; i < entryList.count(); ++i ) {
-             currentElement = entryList.item( i ).toElement();
-             if ( currentElement.parentNode() == groupElement ) {
-                 result = readLesson( currentElement );
-                 if ( !result )
-                     return false;
-             }
+     // Additional cleanup: Put orphaned entries without a lesson into a default lesson.
+     KEduVocLesson *defaultLesson = new KEduVocLesson(i18n("Default Lesson"), m_doc->lesson());
+     // now make sure we don't have any orphan entries
+     foreach (KEduVocExpression * entry, m_allEntries.values()) {
+         if (entry->lessons().count() == 0)
+         {
 -            defaultLesson->addEntry(entry);
++            defaultLesson->appendEntry(entry);
          }
-         // end @todo
+     }
+     if (defaultLesson->entryCount() > 0)
+     {
+         m_doc->lesson()->appendChildContainer(defaultLesson);
+     } else {
+         delete defaultLesson;
      }
  
      return true;
@@@ -461,10 -434,9 +434,9 @@@ bool KEduVocKvtml2Reader::readLesson( K
      currentElement = lessonElement.firstChildElement( KVTML_ENTRY );
      while ( !currentElement.isNull() ) {
          bool result = false;
-         int id = currentElement.attribute( KVTML_ID ).toInt( &result );
+         int entryId = currentElement.attribute( KVTML_ID ).toInt( &result );
          if(result) {
-             m_doc->entry(id)->setLesson(lessonId);
-             m_doc->lesson(lessonId).addEntry(id);
 -            lesson->addEntry( m_allEntries[entryId] );
++            lesson->appendEntry( m_allEntries[entryId] );
          }
          currentElement = currentElement.nextSiblingElement( KVTML_ENTRY );
      }
index 3b664beed60e356c3f1182057a17c85a8c4e468e,10e553e1c54cef1a72606e18a281076453b38d7b..b5140fd3a3a901c6f3e49a10cb39bceb4532e07e
@@@ -85,10 -86,21 +86,18 @@@ private
      bool readConjugation( QDomElement &conjugElement, KEduVocConjugation &conjugation );
      bool readConjugationPerson( QDomElement &personElement, KEduVocConjugation &conjugation, KEduVocConjugation::ConjugationNumber number );
  
 -    /**
 -     * Read an individual word type
 -     * @param parentContainer 
 -     * @param typesElement 
 -     * @return 
 +    /** read the types
 +     * @param typesElement QDomElement for the types group
       */
-     bool readWordTypes( QDomElement &typesElement );
+     bool readWordType( KEduVocWordType* parentContainer, QDomElement &typesElement );
+     /**
+      * Read all <container> tags within a word type definition.
+      * @param parentContainer 
+      * @param lessonElement 
+      * @return 
+      */
+     bool readChildWordTypes( KEduVocWordType* parentContainer, QDomElement &lessonElement );
  
      /** read the tenses
       * @param tensesElement QDomElement for the tenses group
index c137c2e1a98754e849747ede8d67143307ae1e08,bd934c6ba8c7ec08d6df938e00e4a5d192b25428..00fa72634849b4e24406d2b6b3b8cb26363938e0
@@@ -1119,24 -982,15 +982,15 @@@ bool KEduVocKvtmlReader::readExpression
          textstr = currentElement.lastChild().toText().data();
  
          if ( i == 0 ) {
-             expr = KEduVocExpression( textstr, lesson );
-             expr.setActive( active );
+             entry = new KEduVocExpression( textstr );
+             entry->setActive( active );
+             if ( lessonNumber != -1 ) {
 -                static_cast<KEduVocLesson*>(m_doc->lesson()->childContainer(lessonNumber))->addEntry(entry);
++                static_cast<KEduVocLesson*>(m_doc->lesson()->childContainer(lessonNumber))->appendEntry(entry);
+             } else {
 -                m_doc->lesson()->addEntry(entry);
++                m_doc->lesson()->appendEntry(entry);
+             }
          } else {
-             expr.setTranslation( i, textstr );
+             entry->setTranslation( i, textstr );
          }
  
          // better make sure, translation(i) already exists...
index 2028c0d7095d1ca10e3a01ff53aefb50aa7508eb,60d7d7bda9f6059d0f44243cdca1e53f0d669c2c..56bf027d67f9cba20bf87d456446a4fee02f4623
  
  #include "keduvoclesson.h"
  
- #include <QSet>
+ #include "keduvocexpression.h"
++#include <KRandomSequence>
+ #include <QList>
  
  /** private class to store information about a lesson */
  class KEduVocLesson::Private
@@@ -83,60 -64,20 +65,32 @@@ int KEduVocLesson::entryCount(
      return d->m_entries.count();
  }
  
- void KEduVocLesson::addEntry( int entryid )
 -void KEduVocLesson::addEntry(KEduVocExpression* entry)
++void KEduVocLesson::appendEntry(KEduVocExpression* entry)
  {
-     d->m_entries.insert( entryid );
+     d->m_entries.append( entry );
+     entry->addLesson(this);
  }
  
- void KEduVocLesson::removeEntry( int entryid )
++void KEduVocLesson::insertEntry(int index, KEduVocExpression * entry)
 +{
-     d->m_entries.remove( entryid );
++    d->m_entries.insert( index, entry );
++    entry->addLesson(this);
 +}
 +
- void KEduVocLesson::incrementEntriesAbove( int entryid )
+ void KEduVocLesson::removeEntry(KEduVocExpression* entry)
  {
-     QList<int> entries = d->m_entries.toList();
-     
-     // increment all entry id's above entryid
-     for (int i = 0; i < entries.size(); ++i) {
-         if (entries[i] >= entryid) {
-             entries[i] = entries[i] + 1;
-         }
-     }
-     
-     // then put the new list into the set
-     d->m_entries = entries.toSet();
- }
-     
- void KEduVocLesson::decrementEntriesAbove( int entryid )
- {
-     QList<int> entries = d->m_entries.toList();
-     
-     // increment all entry id's above entryid
-     int i = 0;
-     while (i < entries.size()) {
-         if (entries[i] == entryid) {
-             entries.removeAt(i);
-         }
-         else if (entries[i] > entryid) {
-             entries[i] = entries[i] - 1;
-             ++i;
-         }
-         else {
-             ++i;
-         }
-     }
-     
-     // then put the new list into the set
-     d->m_entries = entries.toSet();
+     d->m_entries.removeAt( d->m_entries.indexOf(entry) );
+     entry->removeLesson(this);
  }
  
bool KEduVocLesson::inPractice()
KEduVocExpression * KEduVocLesson::entry(int row)
  {
-     return d->m_inPractice;
+     return d->m_entries.value(row);
  }
  
- void KEduVocLesson::setInPractice(bool inPractice)
++void KEduVocLesson::randomizeEntries()
 +{
-     d->m_inPractice = inPractice;
++    KRandomSequence randomSequence(QDateTime::currentDateTime().toTime_t());
++    randomSequence.randomize( d->m_entries );
 +}
++
index 829beab3f275c36cc7c9f8fae7e1bd42728809b1,ef48d79df1335eaa79c2c9ed506483e0a2ac3ae5..beb86c8ce9002e8dce646eb38ad2f140d9f22fb0
@@@ -56,31 -58,15 +58,27 @@@ public
      /** get the number of entries in the lesson */
      int entryCount();
  
--    /** add an entry to the lesson
++    /** append an entry to the lesson
       * @param entryid id of the entry to add
       */
-     void addEntry( int entryid );
 -    void addEntry(KEduVocExpression* entry);
++    void appendEntry(KEduVocExpression* entry);
 +
-     /** remove an entry from the lesson
-      * @param entryid id of the entry to remove
-      */
-     void removeEntry( int entryid );
-     
-     /** increments all entryids > entryid, because their entryid has been incremented
-      * @param entryid       id of the entry that was inserted
-      */
-     void incrementEntriesAbove( int entryid );
-     
-     /** decrements all etryids > entryid, because their entryid has been decremented
-      * @param entryid       id of the entry that was removed
++    /**
++     * insert an entry at a specific position
++     * @param index 
++     * @param entry 
 +     */
-     void decrementEntriesAbove( int entryid );
++    void insertEntry(int index, KEduVocExpression* entry);
 +
-     bool inPractice();
-     void setInPractice( bool inPractice );
++    /**
++     * shuffle the order of the entries in the lesson
++     */
++    void randomizeEntries();
  
-     /** equality operator */
-     bool operator==(const KEduVocLesson &other);
+     /** remove an entry from the lesson
+      * @param entryid id of the entry to remove
+      */
+     void removeEntry(KEduVocExpression* entry);
  
  private:
      class Private;
index 2ed69c485ecc1f176e76a554ef0e62134d172238,9f9de2493a87d12a4dc201c86792805710935b5e..4ded3e480222ea9401b8cbfddad2b99ba82036fb
@@@ -126,9 -127,11 +127,11 @@@ void KEduVocPaukerReader::readCard(
          }
      }
  
-     KEduVocExpression expr = KEduVocExpression( front );
-     expr.setTranslation( 1, back );
-     m_doc->appendEntry( &expr );
+     KEduVocLesson* lesson = new KEduVocLesson(i18n("Vocabulary"), m_doc->lesson());
+     m_doc->lesson()->appendChildContainer(lesson);
+     KEduVocExpression* expr = new KEduVocExpression( QStringList() << front << back);
 -    lesson->addEntry( expr );
++    lesson->appendEntry( expr );
  }
  
  
index 83dde8846047ba6b330f2f655c2eaa2ac278be33,3a6470e726b01473ade7be6356dadea97043101e..19efb447dfd5ef7812756ed613e6388151544c54
@@@ -135,16 -135,18 +135,18 @@@ bool KEduVocVokabelnReader::readDoc( KE
          words = expression.split( "\"," );
          original = words[0].mid( 1 );
          translation = words[1].mid( 1 );
-         lesson = words[2].toInt() - 1;
+         lessonNumber = words[2].toInt() - 1;
+         while(m_doc->lesson()->childContainerCount() < lessonNumber) {
+             KEduVocLesson* lesson = new KEduVocLesson(i18n("Lesson %1", lessonNumber), m_doc->lesson());
+             m_doc->lesson()->appendChildContainer(lesson);
+         }
  
-         KEduVocExpression kve;
-         kve.setTranslation( 0, original );
-         kve.setTranslation( 1, translation );
-         kve.translation( 1 ).gradeFrom( 0 ).setGrade( 0 );
-         kve.translation( 0 ).gradeFrom( 1 ).setGrade( 0 );
-         kve.setLesson( lesson );
+         KEduVocExpression* kve = new KEduVocExpression;
+         kve->setTranslation( 0, original );
+         kve->setTranslation( 1, translation );
  
-         m_doc->appendEntry( &kve );
 -        static_cast<KEduVocLesson*>(m_doc->lesson()->childContainer(lessonNumber))->addEntry(kve);
++        static_cast<KEduVocLesson*>(m_doc->lesson()->childContainer(lessonNumber))->appendEntry(kve);
  
          inputStream.readLine();
          inputStream.readLine();
index b0131daea58ea6ee67d1e4447ccdd51d62387fba,8f225ed9b7eb5aa42a64dd41ca5c830642e91997..eca1c14f14d4a448d003ecf66b9996a59c496c80
@@@ -163,7 -163,7 +163,7 @@@ bool KEduVocWqlReader::readDoc( KEduVoc
  
          KEduVocExpression expr = KEduVocExpression( s );
          expr.setTranslation( 1, b );
-         m_doc->appendEntry( &expr );
 -        m_doc->lesson()->addEntry( &expr );
++        m_doc->lesson()->appendEntry( &expr );
      }
      return true;
  }
index f3b5243a073a69702d8b64997042e97a37b9cb35,4a1497fa0800fd8738f4613e731d16c7c503e57a..4317f6ff1fbc8a4a19c2bbcc72af2ace295743b6
@@@ -115,5 -115,5 +115,5 @@@ void KEduVocXdxfReader::readEntry(
  
      KEduVocExpression expr = KEduVocExpression( front );
      expr.setTranslation( 1, back );
-     m_doc->appendEntry( &expr );
 -    m_doc->lesson()->addEntry( &expr );
++    m_doc->lesson()->appendEntry( &expr );
  }