if(settings){
plugin->setPath(settings->value("path"));
QStringList list = settings->keys();
- foreach(QString key, list)
- plugin->settings()->setValue(key, settings->value(key));
a=a+1;
plugin->db_name = plugin->_settings->value("type")
settings->value("generateCache") == "true") {
plugin->makeCache("");
}
+ foreach(QString key, list)
+ if(key != "generateCache")
+ plugin->settings()->setValue(key, settings->value(key));
delete settings;
}
plugin->getDictionaryInfo();
return true;
}
+
+
void XdxfPlugin::setHash(uint _hash) {
this->_hash=_hash;
}
+
+
uint XdxfPlugin::hash() const {
return _hash;
}
+
+
Settings* XdxfPlugin::settings() {
return _settings;
}
+
+
bool XdxfPlugin::isCached() {
if(_settings->value("cached") == "true")
return true;
return false;
}
+
+
void XdxfPlugin::setSettings(Settings *settings) {
QString oldPath = _settings->value("path");
setPath(settings->value("path"));
}
+ foreach(QString key, settings->keys())
+ if(key != "generateCache")
+ _settings->setValue(key, settings->value(key));
+
if((_settings->value("cached") == "false" ||
- _settings->value("cached").isEmpty()) &&
- settings->value("generateCache") == "true") {
+ _settings->value("cached").isEmpty()) &&
+ settings->value("generateCache") == "true") {
makeCache("");
}
- else {
+ else if (settings->value("generateCache") != "true") {
_settings->setValue("cached", "false");
}
- foreach(QString key, settings->keys())
- if(key != "generateCache")
- _settings->setValue(key, settings->value(key));
+
+
delete settings;
emit settingsChanged();
}
+
+
void XdxfPlugin::getDictionaryInfo() {
QFile dictionaryFile(path);
if(!dictionaryFile.open(QFile::ReadOnly | QFile::Text)) {
cur.prepare("insert into dict values(?,?,?)");
cur.addBindValue(a);
cur.addBindValue(removeAccents(a));
- qDebug() << removeAccents(a);
cur.addBindValue(temp);
cur.exec();
counter++;