_wordsCount = -1;
_settings = new Settings();
_dictDialog = new XdxfDictDialog(this, this);
+ cachingDialog = new XdxfCachingDialog(this);
+
_settings->setValue("type","xdxf");
if(isCached())
_settings->setValue("cached","true");
bool XdxfPlugin::makeCache(QString dir) {
+ cachingDialog->setVisible(true);
QFileInfo dictFileN(_settings->value("path"));
QString cachePathN;
cachePathN = dictFileN.dir().absolutePath() + "/"
counter=0;
while (!reader.atEnd()) {
+ QCoreApplication::processEvents();
+ //usleep(50);
reader.readNext();
if(reader.tokenType() == QXmlStreamReader::StartElement) {
counter++;
int prog = counter*100/_wordsCount;
if(prog % 5 == 0)
- Q_EMIT update(prog);
+ Q_EMIT updateCachingProgress(prog);
}
}
}
+ cachingDialog->setVisible(false);
+
qDebug()<<counter;
cur.exec("END;");
cur.exec("select count(*) from dict");