TranslationXdxf::TranslationXdxf() {
}
-TranslationXdxf::TranslationXdxf(QString _key, QString _dictionaryInfo, XdxfPlugin *xdxfPlugin): _key(_key),_dictionaryInfo(_dictionaryInfo) {
+TranslationXdxf::TranslationXdxf(QString _key, QString _dictionaryInfo,
+ XdxfPlugin *xdxfPlugin): _key(_key),_dictionaryInfo(_dictionaryInfo) {
this->xdxfPlugin=xdxfPlugin;
+ if(xdxfPlugin)
+ _dictHash = xdxfPlugin->hash();
}
QString TranslationXdxf::key() const {
QString TranslationXdxf::toHtml() const {
QString result("");
-// qDebug()<<xdxfPlugin->search(_key);
- result+="<dict>" + _dictionaryInfo + "<key>" + _key + "</key>" +xdxfPlugin->search(_key) + "</dict>";
+ if(!xdxfPlugin)
+ return result;
+ result+="<dict>" + _dictionaryInfo + "<key>" + _key + "</key>" +
+ xdxfPlugin->search(_key) + "</dict>";
result.replace("&","&");
-// qDebug()<<result;
return result;
}