Removed an unnecessary translation file check.
It was missing the file extension and QTranslator returns false if it was unable to find the translation file which is just as good. QTranslator can also check for several variations of the given filename.
This commit is contained in:
parent
d5762b8003
commit
f603dfde82
|
@ -89,15 +89,6 @@ bool TranslationHandler::SetLanguage(const int index, QString &error)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Check translation file exists before trying to load it
|
||||
if (!QFile::exists(mFiles[index]))
|
||||
{
|
||||
QString filename(mFiles[index]);
|
||||
error = QObject::tr("Language file %1.qm not found!");
|
||||
error = error.arg(mFiles[index]);
|
||||
return false;
|
||||
}
|
||||
|
||||
//Load the new language
|
||||
if (!mTranslator->load(mFiles[index]))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue