_settings->setValue("lang_to","");
_settings->setValue("lang_from","");
_settings->setValue("type","google");
- _settings->setValue("connection_acepted","true");
+ _settings->setValue("connection_accepted","true");
_dictDialog = new GoogleDictDialog(this,this);
_icon = QIcon(":/icons/drawing.png");
_hash=123456;
void GooglePlugin::setConnectionAccept(QString connectionAcepted) {
if(connectionAcepted=="true")
- _settings->setValue("connection_acepted","true");
+ _settings->setValue("connection_accepted","true");
else
- _settings->setValue("connection_acepted","false");
+ _settings->setValue("connection_accepted","false");
}
bool GooglePlugin::isConnectionAccept() const {
- if(_settings->value("connection_acepted")=="true")
+ if(_settings->value("connection_accepted")=="true")
return true;
else
return false;
Settings *settings = new Settings();
settings->setValue("lang_to",languages.value(settingsDialog.langTo()));
settings->setValue("lang_from",languages.value(settingsDialog.langFrom()));
- settings->setValue("connection_accept","true");
+ settings->setValue("connection_accepted","true");
settings->setValue("type","google");
return settings;
}
}
QSqlQuery cur(db);
+
cur.prepare("select translation from dict where word like ?");
cur.addBindValue(key);
cur.exec();
}
void XdxfPlugin::setPath(QString path){
- if(this->path!=path && this->path!="" && _settings->value("cache_path")!="");
- clean();
+ // if(this->path!=path && this->path!="" && _settings->value("cache_path")!="")
+ // clean();
this->path=path;
_settings->setValue("path",path);
//getDictionaryInfo();
cur.exec("PRAGMA synchronous = 0");
cur.exec("drop table dict");
QCoreApplication::processEvents();
- cur.exec("create table dict(word text, normalized text ,tanslation text)");
+ cur.exec("create table dict(word text, normalized text ,translation text)");
int counter = 0;
cur.exec("BEGIN;");
cur.exec("END;");
cur.exec("select count(*) from dict");
- settings()->setValue("strip_accents", stripAcc);
+// settings()->setValue("strip_accents", stripAcc);
countWords();
cachingDialog->setVisible(false);
File.close();
}
-void XdxfTest::timeCacheNormalize() {
+void XdxfTest::timeCacheNormalize() {
QTime timer;
QDate date;
QFile File("../tests/time.xml");
File.close();
}
-void XdxfTest::removeAccents()
+void XdxfTest::removeAccents()
{
XdxfPluginSub xdxf;
xdxf.settings()->setValue(QString("strip_accents"), QString("true"));
void timeCache();
void timeFile();
void removeAccents();
+ void timeCacheNormalize();
+ void timeFileNormalize();
};
class XdxfPluginSub : public XdxfPlugin
{
public:
XdxfPluginSub(QObject *parent = 0) : XdxfPlugin(parent){}
- QString getRemoveAccents(QString s)
- {
+ QString getRemoveAccents(QString s) {
return removeAccents(s);
}
- void timeCacheNormalize();
- void timeFileNormalize();
+
};