- qDebug() << "!!asdf";
- result+= _dictionaryInfo + "</info>" +
- starDictPlugin->search(_key, offsets.at(i), lengths.at(i))
- + "</dict>";
- qDebug() << "!!!!asdf";
+ if(_dictionaryInfo.isEmpty())
+ result+= "starDict dictionary </info>";
+ else
+ result+= _dictionaryInfo +"</info>";
+
+ /*przeformatowanie zwracanego stringu na oczekiwany format*/
+ QString text =starDictPlugin->search(_key, offsets.at(i), lengths.at(i));
+ text.replace("</k>","</key><t>");
+ text.replace("<k>","</t><key>");
+ int pos=text.indexOf("</t>");
+ if(pos!=-1)
+ text.remove(pos,4);
+
+ result+= text;
+ result+= "</t> </dict>";
+ qDebug()<<"trans"<<result;