Merge branch 'qml' of ssh://drop.maemo.org/git/mdictionary into qml
[mdictionary] / src / plugins / google / GooglePlugin.cpp
index ee25c53..733a51f 100644 (file)
@@ -20,6 +20,8 @@
 *******************************************************************************/
 /*!
     \file GooglePlugin.cpp
+    \brief Implementation of google plugin's main class.
+
     \author Jakub Jaszczynski <j.j.jaszczynski@gmail.com>
 */
 
@@ -39,7 +41,8 @@ GooglePlugin::GooglePlugin(QObject *parent): CommonDictInterface(parent),
     _settings->setValue("type","google");
     _settings->setValue("connection_accepted","true");
     _dictDialog = new GoogleDictDialog(this,this);
-    _icon = QIcon("/usr/share/mdictionary/google.png");
+    _iconPath = "/usr/share/mdictionary/google.png";
+    _icon = QIcon(_iconPath);
 
     stopped = false;
     initLanguages();
@@ -148,6 +151,10 @@ QIcon* GooglePlugin::icon() {
     return &_icon;
 }
 
+QString GooglePlugin::iconPath(){
+    return _iconPath;
+}
+
 
 CommonDictInterface* GooglePlugin::getNew(const Settings* settings) const {
     GooglePlugin *plugin = new GooglePlugin();
@@ -211,6 +218,7 @@ QList<Translation*> GooglePlugin::searchWordList(QString word, int ) {
         }
 
         QString text = QString::fromUtf8(http->readAll());
+//        qDebug()<<"google test"<<text;
         text=jsonParse(text);
         if(text!="") {
             text="<key>" + word + "</key>" + "<t>" + text + "</t>";