From: Frederik Gladhorn Date: Sun, 17 Jun 2007 19:59:56 +0000 (+0000) Subject: Improve operator= for translations and reenable setGrade (was accidentally commented... X-Git-Tag: v3.91.0~11 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=37fc85ade9a141018baa1db4609cfb0c71bb48a1;p=libqmvoc.git Improve operator= for translations and reenable setGrade (was accidentally commented out). svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=676826 --- diff --git a/kdeeducore/keduvocgrade.h b/kdeeducore/keduvocgrade.h index 968f75e..797be5c 100644 --- a/kdeeducore/keduvocgrade.h +++ b/kdeeducore/keduvocgrade.h @@ -44,6 +44,7 @@ #define KV_LEV7_GRADE 7 #define KV_LEV7_TEXT I18N_NOOP("Level 7") +#include "libkdeedu_core_export.h" #include @@ -55,7 +56,7 @@ Contains grading information (query date, bad count) for one language with respe @author Frederik Gladhorn */ -class KEduVocGrade +class KDEEDUCORE_EXPORT KEduVocGrade { public: KEduVocGrade(); @@ -68,7 +69,6 @@ public: count_t m_badCount; QDateTime m_queryDate; - }; #endif diff --git a/kdeeducore/keduvoctranslation.cpp b/kdeeducore/keduvoctranslation.cpp index 49cd7bf..f0756be 100644 --- a/kdeeducore/keduvoctranslation.cpp +++ b/kdeeducore/keduvoctranslation.cpp @@ -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; }