QList<TranslationPtr> dummy;
stopped = false;
foreach(Translation* tr, translations) {
- if(containsDict(tr->dict()) || !tr->dict())
+ if(containsDict(tr->dict()) || !tr->dict())
dummy.append(TranslationPtr(tr));
+ /* foreach(CommonDictInterface* dict, activeDicts()) {
+ Translation* trans = dict->getTranslationFor(tr->key());
+ if(trans)
+ dummy.append(TranslationPtr(trans));
+ } */
+ }
+ if(translations.size()>0) {
+ Translation *tr = translations.at(0);
foreach(CommonDictInterface* dict, activeDicts()) {
Translation* trans = dict->getTranslationFor(tr->key());
if(trans)
dummy.append(TranslationPtr(trans));
}
- }
+ }
_innerHtmlResult = QtConcurrent::mapped(dummy,
&TranslationPtr::toHtml);
}
QString GooglePlugin::jsonParse(QString result) {
- //qDebug()<<result;
+ qDebug()<<result;
int pos=0,pos2=0,index=0,size=0;
QString returnLang;
QString translation;
result=translation;
for(int i=0; i<words.size();i++) {
result+="<br/>";
- result+="<pos>"+partOfSpeach.at(i)+"</pos>:";
+ result+="<pos>"+partOfSpeach.at(i)+"</pos>: S";
for(int j=0; j<words.at(i)->size();j++)
result+=words.at(i)->at(j)+", ";
result.remove(result.size()-2,2);