]> Git trees. - libqmvoc.git/commitdiff
cleanup, improve identifier copy constructor
authorFrederik Gladhorn <gladhorn@kde.org>
Sat, 1 Sep 2007 23:41:21 +0000 (23:41 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Sat, 1 Sep 2007 23:41:21 +0000 (23:41 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=707488

keduvocdocument/keduvocexpression.cpp
keduvocdocument/keduvocidentifier.cpp
keduvocdocument/keduvockvtmlreader.cpp
keduvocdocument/keduvockvtmlwriter.cpp

index ef3b8fb3da6666265a2d7c889f01805a0280463a..69ed6a327d6170b484781a17047b42b4c717558f 100644 (file)
@@ -131,16 +131,10 @@ void KEduVocExpression::setTranslation( int index, const QString & expr )
     if ( index < 0 )
         return;
 
-///@todo get rid of this nonsense:
-    /* not needed with qmap but for now all translations <= index are expected to exist
-      // extend translations with empty strings if necessary
-      for (int i = d->m_translations.count(); i < index + 1; i++) {
-          d->m_translations.append("");
-      }
-    */
-    for ( int i = d->m_translations.count(); i <= index; i++ ) {
-        d->m_translations[i] = KEduVocTranslation( "" );
-    }
+// extend translations with empty strings if necessary
+//     for ( int i = d->m_translations.count(); i <= index; i++ ) {
+//         d->m_translations[i] = KEduVocTranslation( "" );
+//     }
 //  if (index <= translations.count())
 
     d->m_translations[index] = expr.simplified();
index ce50db019df45b7ecf1ea4820d4797134388cd79..cb059103327488910711f28b37d695f5887118f0 100644 (file)
@@ -73,11 +73,14 @@ KEduVocIdentifier::~KEduVocIdentifier()
 KEduVocIdentifier::KEduVocIdentifier( const KEduVocIdentifier &other )
 : d( new Private )
 {
-///@todo
     d->m_locale = other.d->m_locale;
     d->m_name = other.d->m_name;
     d->m_articles = other.d->m_articles;
     d->m_personalPronouns = other.d->m_personalPronouns;
+    d->m_comment = other.d->m_comment;
+    d->m_sizeHint = other.d->m_sizeHint;
+    d->m_tenses = other.d->m_tenses;
+    d->m_type = other.d->m_type;
 }
 
 
index 66bffb0a3e0ef95bdcd79fa6359350844ed2b7b2..fb5d4c08520730f86986625606f51e65ded99b0e 100644 (file)
@@ -132,7 +132,6 @@ bool KEduVocKvtmlReader::readBody( QDomElement &domElementParent )
 
     currentElement = domElementParent.firstChildElement( KV_CONJUG_GRP );
     if ( !currentElement.isNull() ) {
-///@todo conjugations
         int count = 0;
 
         QDomElement domElementConjugChild = currentElement.firstChildElement(KV_CON_ENTRY);
index 7bb16c04a057f2e080e7bf6b37b590643c0723c7..3b24cbdf0f24fe689a3a2bda733c499892f7a29a 100644 (file)
@@ -138,7 +138,7 @@ bool KEduVocKvtmlWriter::writeDoc( KEduVocDocument *doc, const QString &generato
 
         if ( !entry->translation( 0 ).example().isEmpty() )
             domElementOriginal.setAttribute( KV_EXAMPLE, entry->translation( 0 ).example() );
-///@todo enable writing of usages
+///@todo enable writing of usages in old format
         /*
             if (!entry->translation(0).usageLabel().isEmpty() )
               domElementOriginal.setAttribute(KV_USAGE, entry->translation(0).usageLabel());