Changed path to plugins folder
[mdictionary] / trunk / src / base / backbone / backbone.cpp
index f8c84d6..dde87a2 100644 (file)
@@ -27,7 +27,7 @@
 void Backbone::init() {
    _searchLimit = 10;
    _interval = 250; //msec
-   _pluginPath = "../lib/mdictionary/";
+   _pluginPath = "/usr/lib/mdictionary/";
    loadPlugins();
 
    if(!connect(&_timer, SIGNAL(timeout()), this, SLOT(translation())))
@@ -119,7 +119,6 @@ void Backbone::stopSearching() {
 
 
 void Backbone::search(QString word) {
-    //TODO add running searches in new threads
     _timer.stop();
     _result.clear();
     _innerResult.clear();
@@ -155,6 +154,11 @@ void Backbone::search(QString word) {
      _dicts[dict] = 1;
  }
 
+ void Backbone::removeDictionary(CommonDictInterface *dict) {
+     _dicts.remove(dict);
+
+ }
+
 
 
  void Backbone::quit() {
@@ -202,7 +206,7 @@ void Backbone::loadPlugins() {
 
 
     foreach(QString file, files) {
-        QPluginLoader loader(file);
+        QPluginLoader loader(plug.absoluteFilePath(file));
         if(!loader.load()) {
             qDebug()<< file << " " << loader.errorString();
             continue;