Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 22837 → Rev 22838

/trunk/Scribus/scribus/langmgr.cpp
1035,15 → 1035,17
dictList.replaceInStrings(".dic","");
 
//Ensure we have aff+dic file pairs, remove any hyphenation dictionaries from the list
 
foreach(const QString& dictName, dictList)
for (const QString& dictName : qAsConst(dictList))
{
if (!QFile::exists(dictionaryPaths.at(i)+dictName+".aff"))
{
dictList.removeAll(dictName);
else
{
if (!dictionaryMap.contains(dictName))
{
continue;
}
if (dictionaryMap.contains(dictName))
continue;
 
if (dictName.length()<=5)
{
//QString shortAbbrev(LanguageManager::getShortAbbrevFromAbbrev(dictName));
1059,8 → 1061,6
dictionaryMap.insert(shortAbbrev, dictionaryPaths.at(i)+dictName);
}
}
}
}
// qDebug()<<"Number of dictionaries/AFFs found in"<<dictionaryPaths.at(i)<<":"<<dictList.count();
}
//Now rescan dictionary map for any extra languages we can support with the files we have
1111,7 → 1111,8
dictFilters.append("*.dic");
QStringList dictList(dictLocation.entryList(dictFilters, QDir::Files, QDir::Name));
dictList.replaceInStrings(".dic","");
foreach(const QString& dn, dictList)
 
for (const QString& dn : qAsConst(dictList))
{
// qDebug()<<dn;
QString dictName;
1119,8 → 1120,8
dictName=dn.section('_',1);
else
dictName=dn;
if (!dictionaryMap.contains(dictName))
{
if (dictionaryMap.contains(dictName))
continue;
if (dictName.length()<=2)
{
dictionaryMap.insert(dictName, dictionaryPaths.at(i)+dn+".dic");
1133,7 → 1134,6
}
}
}
}
 
LanguageManager::~LanguageManager()
{