projects
/
mdictionary
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed loading same plugin multiple times
[mdictionary]
/
trunk
/
src
/
base
/
backbone
/
backbone.cpp
diff --git
a/trunk/src/base/backbone/backbone.cpp
b/trunk/src/base/backbone/backbone.cpp
index
e05b042
..
a458852
100644
(file)
--- a/
trunk/src/base/backbone/backbone.cpp
+++ b/
trunk/src/base/backbone/backbone.cpp
@@
-346,8
+346,15
@@
void Backbone::loadPlugins() {
}
QObject *pl = loader.instance();
}
QObject *pl = loader.instance();
+ bool exists = 0;
CommonDictInterface *plugin = qobject_cast<CommonDictInterface*>(pl);
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);
}
}
}
}