projects
/
mdictionary
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change html to xml in funcions names
[mdictionary]
/
src
/
plugins
/
google
/
TranslationGoogle.cpp
diff --git
a/src/plugins/google/TranslationGoogle.cpp
b/src/plugins/google/TranslationGoogle.cpp
index
5d1d5c8
..
2e54ea9
100644
(file)
--- a/
src/plugins/google/TranslationGoogle.cpp
+++ b/
src/plugins/google/TranslationGoogle.cpp
@@
-43,31
+43,29
@@
TranslationGoogle::~TranslationGoogle(){
;
}
;
}
-
QString TranslationGoogle::key() const{
return _key;
}
QString TranslationGoogle::key() const{
return _key;
}
-QString TranslationGoogle::dictionaryInfo() const {
- return _dictionaryInfo;
-}
-
-QString TranslationGoogle::toHtml() const {
+QString TranslationGoogle::toXml() const {
QString result("");
if(!googlePlugin)
return result;
QString result("");
if(!googlePlugin)
return result;
- result="<dict> <info path=\"/usr/share/mdictionary/drawing.png\" ";
+ result="<dict> <info path=\"/usr/share/mdictionary/google.png\" ";
if(isBookmark())
result+="bookmark=\"true\" >";
else
result+="bookmark=\"false\" >";
if(isBookmark())
result+="bookmark=\"true\" >";
else
result+="bookmark=\"false\" >";
+ qDebug()<<"trans: "<<_trans;
+
if(_trans!="")
return result+=_dictionaryInfo+ "</info>"+_trans +"</dict>";
QList<Translation*> translations=googlePlugin->searchWordList(_key);
if(_trans!="")
return result+=_dictionaryInfo+ "</info>"+_trans +"</dict>";
QList<Translation*> translations=googlePlugin->searchWordList(_key);
+ qDebug()<<"test: "<<translations.size();
if(translations.size()>0 && translations.at(0))
if(translations.size()>0 && translations.at(0))
- return translations.at(0)->toHtml();
+ return translations.at(0)->toXml();
return "";
}
return "";
}