if(regWord.exactMatch(removeAccents(a)) && (i<limit || limit==0)) {
bool ok=true;
Translation *tran;
- foreach(tran,translations)
- {
+ foreach(tran,translations) {
if(tran->key()==a)
ok=false; /*if key word is in the dictionary more that one */
}
return true;
}
-void XdxfPlugin::setHash(uint _hash)
-{
+void XdxfPlugin::setHash(uint _hash) {
this->_hash=_hash;
}
-uint XdxfPlugin::hash() const
-{
+uint XdxfPlugin::hash() const {
return _hash;
}
return _settings;
}
-bool XdxfPlugin::isCached()
-{
+bool XdxfPlugin::isCached() {
if(_settings->value("cached") == "true")
return true;
return false;
QXmlStreamReader reader(&dictionaryFile);
-
db.setDatabaseName(cachePathN);
if(!db.open()) {
- qDebug() << "Database error" << endl;
+ qDebug() << "Database error" << db.lastError().text() << endl;
return false;
}
QCoreApplication::processEvents();
while (!reader.atEnd() && !stopped) {
QCoreApplication::processEvents();
- // usleep(50);
reader.readNext();
if(reader.tokenType() == QXmlStreamReader::StartElement) {