}
QObject *pl = loader.instance();
+ bool exists = 0;
CommonDictInterface *plugin = qobject_cast<CommonDictInterface*>(pl);
- _plugins.append(plugin);
+ foreach(CommonDictInterface* pl, _plugins)
+ if(pl->type() == plugin->type()) {
+ exists = 1;
+ break;
+ }
+ if(!exists)
+ _plugins.append(plugin);
}
}
GooglePlugin::GooglePlugin(QObject *parent): CommonDictInterface(parent),
_langFrom(tr("")), _langTo(tr("")),_name(tr("")),
- _type(tr("google")), _infoNote(tr("")) {
+ _type("google"), _infoNote(tr("")) {
stopped = false;
_connectionAccept = false;
XdxfPlugin::XdxfPlugin(QObject *parent) : CommonDictInterface(parent),
_langFrom(tr("")), _langTo(tr("")),_name(tr("")),
- _type(tr("xdxf")), _infoNote(tr("")) {
+ _type("xdxf"), _infoNote(tr("")) {
_wordsCount = -1;
_settings = new Settings();
_dictDialog = new XdxfDictDialog(this);