fig delete settings
[mdictionary] / trunk / src / plugins / google / src / GooglePlugin.cpp
index 3fe8907..a93a37c 100644 (file)
@@ -122,11 +122,13 @@ void GooglePlugin::setHash(uint _hash) {
 
 
 Settings* GooglePlugin::settings() {
-    Settings *returnSettings=new Settings;
+/*    Settings *returnSettings=new Settings;
     QStringList list = _settings->keys();
     foreach(QString key, list)
             returnSettings->setValue(key,_settings->value(key));
     return returnSettings;
+*/
+    return _settings;
 }
 
 
@@ -148,7 +150,8 @@ QIcon* GooglePlugin::icon() {
 
 CommonDictInterface* GooglePlugin::getNew(const Settings* settings) const {
     GooglePlugin *plugin = new GooglePlugin();
-    plugin->setSettings(settings);
+    if(settings)
+        plugin->setSettings(settings);
     return plugin;
 }