void XdxfPlugin::getDictionaryInfo() {
QFile dictionaryFile(_settings->value("path"));
- if(!dictionaryFile.open(QFile::ReadOnly | QFile::Text)) {
+ if(!QFile::exists(_settings->value("path"))
+ || !dictionaryFile.open(QFile::ReadOnly | QFile::Text)) {
Q_EMIT notify(Notify::Warning,
QString(tr("Xdxf file cannot be read dictionary")));
qDebug()<<"Error: could not open file";
if(_wordsCount>0)
return _wordsCount;
QFile dictionaryFile(_settings->value("path"));
- if(!dictionaryFile.open(QFile::ReadOnly | QFile::Text)) {
+ if(!QFile::exists(_settings->value("path"))
+ || !dictionaryFile.open(QFile::ReadOnly | QFile::Text)) {
Q_EMIT notify(Notify::Warning,
QString(tr("Xdxf file cannot be read for %1 dictionary")
.arg(name())));
} while(QFile::exists(cachePathN));
QFile dictionaryFile(dictFileN.filePath());
- if (!dictionaryFile.open(QFile::ReadOnly | QFile::Text)) {
+ if (!QFile::exists(_settings->value("path"))
+ || !dictionaryFile.open(QFile::ReadOnly | QFile::Text)) {
Q_EMIT updateCachingProgress(100, 0);
Q_EMIT notify(Notify::Warning,
QString(tr("Xdxf file cannot be read for %1 dictionary")