]> Git trees. - libqmvoc.git/commitdiff
Improve operator= for translations and reenable setGrade (was accidentally commented...
authorFrederik Gladhorn <gladhorn@kde.org>
Sun, 17 Jun 2007 19:59:56 +0000 (19:59 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Sun, 17 Jun 2007 19:59:56 +0000 (19:59 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=676826

kdeeducore/keduvocgrade.h
kdeeducore/keduvoctranslation.cpp

index 968f75e93e0b141adb2a2361fd5a64caffac3573..797be5cc65de13ed1dfa168a7305117593201155 100644 (file)
@@ -44,6 +44,7 @@
 #define KV_LEV7_GRADE      7
 #define KV_LEV7_TEXT       I18N_NOOP("Level 7")
 
+#include "libkdeedu_core_export.h"
 
 #include <QtCore/QDateTime>
 
@@ -55,7 +56,7 @@ Contains grading information (query date, bad count) for one language with respe
 
        @author Frederik Gladhorn <frederik.gladhorn@kdemail.net>
 */
-class KEduVocGrade
+class KDEEDUCORE_EXPORT KEduVocGrade
 {
 public:
     KEduVocGrade();
@@ -68,7 +69,6 @@ public:
     count_t m_badCount;
     QDateTime m_queryDate;
 
-
 };
 
 #endif
index 49cd7bf54595486047f44879c8d56c25083b6426..f0756bef3f4629f2ac844717db9f925b4ce66d2b 100644 (file)
@@ -272,7 +272,7 @@ void KEduVocTranslation::setGrade (  int indexFrom, grade_t grade )
         grade = KV_MAX_GRADE;
     if ( grade < KV_MIN_GRADE )
         grade = KV_MIN_GRADE;
-//    m_grades[indexFrom].m_grade = grade;
+    m_grades[indexFrom].m_grade = grade;
 }
 
 
@@ -394,6 +394,19 @@ bool KEduVocTranslation::operator ==(const KEduVocTranslation & translation) con
 KEduVocTranslation & KEduVocTranslation::operator =(const KEduVocTranslation & translation)
 {
     m_translation = translation.m_translation;
+    m_types = translation.m_types;
+    m_usageLabel = translation.m_usageLabel;
+    m_comment = translation.m_comment;
+    m_paraphrase = translation.m_paraphrase;
+    m_synonym = translation.m_synonym;
+    m_example = translation.m_example;
+    m_antonym = translation.m_antonym;
+    m_pronunciation = translation.m_pronunciation;
+    m_comparison = translation.m_comparison;
+    m_multipleChoice = translation.m_multipleChoice;
+    /// @todo m_falseFriends == translation.m_falseFriends;
+    /// @todo m_grades == translation.m_grades;
+    /// @todo m_conjugations == translation.m_conjugations;
     return *this;
 }