Backbone::Backbone(const Backbone &b) :QObject(b.parent()) {
- // init();
_dicts = QHash<CommonDictInterface*, bool > (b._dicts);
_plugins = QList<CommonDictInterface* > (b._plugins);
_result = QHash<QString, Translation* > (b._result);
_innerResult = QtConcurrent::mapped(activeDicts(), mapSearch);
_resultWatcher.setFuture(_innerResult);
-
-
-
- //foreach(CommonDictInterface* dict, _dicts.keys())
- // if(_dicts[dict] == 1) {
- // QFuture<QList<Translation*> > tr =
- // QtConcurrent::run(dict,
- // &CommonDictInterface::searchWordList,word,
- // searchLimit());
- // _innerResult.append(tr);
- // }
-
}
_htmlResult.append(it.next());
//qDebug() << "time " << _time.elapsed();
- Q_EMIT htmlReady();
+ if(_htmlResult.size())
+ Q_EMIT htmlReady();
}