while(cur.next())
translations.insert(new TranslationXdxf(cur.value(0).toString(),
_infoNote, this));
+ db.close();
return translations.toList();
}
cur.exec();
if(cur.next())
result = cur.value(0).toString();
+ db.close();
return result;
}
plugin->db_name = plugin->_settings->value("type")
+ plugin->_settings->value("path");
+ if(!plugin->db.connectionName().isEmpty())
plugin->db = QSqlDatabase::addDatabase("QSQLITE", plugin->db_name);
if(settings->value("cached").isEmpty() &&
cachingDialog->setVisible(false);
if(!cur.next() || countWords() != cur.value(0).toInt())
+ {
+ db.close();
return false;
+ }
_settings->setValue("cache_path", cachePathN);
_settings->setValue("cached", "true");
+ db.close();
return true;
}
settings->setValue("path","../tests/dict.xdxf");
CommonDictInterface *xdxfPlugin = xdxfPluginB.getNew(settings);
- xdxfPlugin->search("wino");
+ //xdxfPlugin->search("wino");
QCOMPARE(xdxfPlugin->search("."), QString("kropka\n"));
QCOMPARE(xdxfPlugin->search("1"), QString("one\n"));
}
QList<Translation*> te11 = xdxfPlugin->searchWordList("h**?*?**e");
QCOMPARE(te11.at(0)->key(), QString("house"));
-
}
void XdxfTest::stop() {