Merge branch 'stardict' of ssh://drop.maemo.org/git/mdictionary into stardict
authorBartosz Szatkowski <bulislaw@linux.com>
Fri, 8 Oct 2010 11:52:03 +0000 (13:52 +0200)
committerBartosz Szatkowski <bulislaw@linux.com>
Fri, 8 Oct 2010 11:52:03 +0000 (13:52 +0200)
Conflicts:
src/plugins/stardict/StarDictPlugin.cpp

1  2 
src/plugins/stardict/StarDictPlugin.cpp
src/plugins/stardict/StarDictPlugin.h

@@@ -174,24 -184,30 +184,36 @@@ QString StarDictPlugin::interpret(QByte
          int pos=result.indexOf("</t>");
          if(pos!=-1)
              result.remove(pos,4);
 -        result+="</t>";
 +        if(result.contains("<t>"))
 +            result+="</t>";
      }
-     else if(mode == 'y')
+     else if(mode == 'y') {
+         result += "<key>" + key + "</key>";
          result += QString::fromUtf8(read(it++, end));
-     else if(mode == 'k')
+     }
+     else if(mode == 'k'){
+         result += "<key>" + key + "</key>";
          result += QString::fromUtf8(read(it++, end));
-     else if(mode == 'w')
+     }
+     else if(mode == 'w'){
+         result += "<key>" + key + "</key>";
          result += QString::fromUtf8(read(it++, end));
-     else if(mode == 'h')
+     }
+     else if(mode == 'h'){
+         result += "<key>" + key + "</key>";
          result += QString::fromUtf8(read(it++, end));
-     else if(mode == 'r')
+     }
+     else if(mode == 'r'){
+         result += "<key>" + key + "</key>";
          result += QString::fromUtf8(read(it++, end));
++        }
 +
 +// Dont know whether mDictionary would ever handle binary stardict format
 +//     to be honest dont see any kind of adventages (can't find any binary dict)
 + /*
+     }
      else if(mode == 'W') {
+         result += "<key>" + key + "</key>";
          if(!last) {
              QByteArray tmp ;
              tmp.append(*(it++));
Simple merge