Clean and order documentation in source files. Source ready to beta 2 release
[mdictionary] / src / plugins / stardict / StarDictPlugin.cpp
index b2de6bb..67e2db3 100644 (file)
@@ -20,6 +20,8 @@
 *******************************************************************************/
 /*!
      \file StarDictPlugin.cpp
+     \brief Implementation of stardict plugin's main class.
+
      \author Jakub Jaszczynski
 */
 
@@ -43,7 +45,10 @@ StarDictPlugin::StarDictPlugin(QObject *parent) : CommonDictInterface(parent),
     _icon = QIcon("/usr/share/mdictionary/stardict.png");
     stopped = false;
 
+    _settings->setValue("strip_accents","true");
+
     initAccents();
+
 }
 
 
@@ -124,9 +129,9 @@ QList<Translation*> StarDictPlugin::searchWordList(QString word, int limit) {
             offset = reader->readInt64BigEndian();
         len = reader->readInt32BigEndian();
 
-        if(keyword.exactMatch(fkey)) {
+        if(keyword.exactMatch(fkey) ) {
             TranslationStarDict tran(fkey, infoNote(), this);
-  //          qDebug() << "off/len" << offset << len;
+  //        qDebug() << "off/len" << offset << len;
             int id = translations.indexOf(tran);
             if(id == -1) {
                 tran.add(offset, len);
@@ -160,19 +165,18 @@ QByteArray StarDictPlugin::read(QByteArray::iterator it,
 
 
 QString StarDictPlugin::interpret(QByteArray::iterator it,
-        QByteArray::iterator end, QChar mode,QString key, bool last) {
+        QByteArray::iterator end, QChar mode,QString key, bool) {
     QString result;
-    qDebug()<<"****** mode:     "<<mode;
-
-    if(mode == 'm' ||
-            mode == 'l' ||
-            mode == 'g' ||
-            mode == 't' ||
-            mode == 'y' ||
-            mode == 'k' ||
-            mode == 'w' ||
-            mode == 'h' ||
-            mode == 'r' ){
+//    qDebug()<<"****** mode:     "<<mode;
+    if(mode == 'm'
+            || mode == 'l'
+            || mode == 'g'
+            || mode == 't'
+            || mode == 'y'
+            || mode == 'k'
+            || mode == 'w'
+            || mode == 'h'
+            || mode == 'r'){
         result += "<key>" + key + "</key>";
         result += "<t>" + QString::fromUtf8(read(it++, end)) + "</t>";
     }
@@ -225,8 +229,6 @@ QString StarDictPlugin::interpret(QByteArray::iterator it,
         } else
             result += read(it++, end);
     } */
-
-    qDebug()<<"wynik  "<<result;
     return result;
 }