[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/parley/src
From:       Frederik Gladhorn <frederik.gladhorn () gmx ! de>
Date:       2008-03-02 20:16:42
Message-ID: 1204489002.272360.11932.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 781415 by gladhorn:

typos and const refs

 M  +8 -8      practice/answervalidator.cpp  
 M  +3 -3      practice/answervalidator.h  
 M  +2 -3      settings/parleyprefs.h  
 M  +1 -1      vocabulary/vocabularymodel.cpp  


--- trunk/KDE/kdeedu/parley/src/practice/answervalidator.cpp #781414:781415
@@ -22,7 +22,7 @@
 #include <sonnet/speller.h>
 #include <kdebug.h>
 
-/// temporary namespace for string manipulation fuctions
+/// temporary namespace for string manipulation functions
 /// could move into KStringHandler eventually
 namespace ParleyStringHandler {
     QString stripAccents(const QString& original){
@@ -79,7 +79,7 @@
 
     if ( !m_speller->isValid() ) {
         kDebug() << "No spellchecker for current language found: " << \
                m_doc->identifier(m_translation).locale();
-        kDebug() << "Avaliable dictionaries: " << m_speller->availableLanguages()
+        kDebug() << "Available dictionaries: " << m_speller->availableLanguages()
                 << "\n names: " << m_speller->availableLanguageNames()
                 << "\n backends: " << m_speller->availableBackends();
         m_spellerAvailable = false;
@@ -97,7 +97,7 @@
     }
 }
 
-int AnswerValidator::levenshteinDistance(QString s, QString t)
+int AnswerValidator::levenshteinDistance(const QString& s, const QString& t)
 {
     int m = s.length();
     int n = t.length();
@@ -139,7 +139,7 @@
     return m_d[m + n*dWidth];
 }
 
-bool AnswerValidator::spellcheckerMisspelled(QString userAnswer)
+bool AnswerValidator::spellcheckerMisspelled(const QString& userAnswer)
 {
     if (!m_spellerAvailable) {
         return true;
@@ -147,7 +147,7 @@
     return m_speller->isMisspelled(userAnswer);
 }
 
-bool AnswerValidator::spellcheckerInSuggestionList(QString solution, QString \
userAnswer) +bool AnswerValidator::spellcheckerInSuggestionList(const QString& \
solution, const QString& userAnswer)  {
     if ( !m_spellerAvailable ) {
         return false;
@@ -302,7 +302,7 @@
 
 void AnswerValidator::checkUserAnswer(const QString & solution, const QString & \
userAnswer, const QString& language)  {
-kDebug() << "CheckUserAnswer with two strings. The one string version is prefered.";
+kDebug() << "CheckUserAnswer with two strings. The one string version is \
preferred.";  if ( !language.isEmpty() ) {
 
     } else {
@@ -350,7 +350,7 @@
             errorTypes = TestEntry::SpellingMistake;
             return;
         }
-        // this is a different word but sounds similiar!
+        // this is a different word but sounds similar!
         if ( !isMisspelled && inSuggestions ) {
             grade = FALSE_FRIEND_GRADE;
 //             htmlCorrection = QString::fromLatin1("<font color=\"#8C1818\">NOOOO! \
That was a false friend!</font> "); @@ -371,7 +371,7 @@
                 errorTypes = TestEntry::SpellingMistake;
                 return;
             } else {
-//                 htmlCorrection = QString::fromLatin1("<font color=\"#8C1818\">I \
don't know that word and it is not similiar to the solution.</font> "); +//           \
htmlCorrection = QString::fromLatin1("<font color=\"#8C1818\">I don't know that word \
and it is not similar to the solution.</font> ");  errorTypes = \
TestEntry::UnknownMistake;  return;
             }
--- trunk/KDE/kdeedu/parley/src/practice/answervalidator.h #781414:781415
@@ -76,11 +76,11 @@
      * @param t
      * @return the Levenshtein Distance measure
      */
-    int levenshteinDistance(QString s, QString t);
+    int levenshteinDistance(const QString& s, const QString& t);
 
-    bool spellcheckerMisspelled(QString s);
+    bool spellcheckerMisspelled(const QString& s);
 
-    bool spellcheckerInSuggestionList(QString solution, QString userAnswer);
+    bool spellcheckerInSuggestionList(const QString& solution, const QString& \
userAnswer);  
     /**
      * Evaluate the closeness of two words. This is probably the most common case.
--- trunk/KDE/kdeedu/parley/src/settings/parleyprefs.h #781414:781415
@@ -15,12 +15,11 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef KVOCTRAINPREFS_H
-#define KVOCTRAINPREFS_H
+#ifndef PARLEYPREFS_H
+#define PARLEYPREFS_H
 
 #include <KConfigDialog>
 
-
 /**
   *@author Peter Hedlund
 */
--- trunk/KDE/kdeedu/parley/src/vocabulary/vocabularymodel.cpp #781414:781415
@@ -105,7 +105,7 @@
     if ( !m_container ) {
         return 0;
     }
-    // only the root index has children because we have no hierachical model.
+    // only the root index has children because we have no hierarchical model.
     if (index == QModelIndex()) {
         return m_container->entryCount(m_recursive);
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic