code clean
[mdictionary] / src / plugins / google / GooglePlugin.cpp
index 0374115..3c3ff11 100644 (file)
@@ -41,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();
@@ -150,6 +151,10 @@ QIcon* GooglePlugin::icon() {
     return &_icon;
 }
 
+QString GooglePlugin::iconPath(){
+    return _iconPath;
+}
+
 
 CommonDictInterface* GooglePlugin::getNew(const Settings* settings) const {
     GooglePlugin *plugin = new GooglePlugin();
@@ -213,7 +218,6 @@ 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>";