Fix Cppcheck warning
This commit is contained in:
parent
aeefaf7004
commit
4854f0034d
|
@ -103,8 +103,7 @@ bool TranslationHandler::setLanguage(const QString &code)
|
|||
if (index == -1) {
|
||||
error = QObject::tr("Unknown language specified!");
|
||||
failure = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
// Make sure there is a translator
|
||||
if (!mTranslator && !failure)
|
||||
mTranslator = new QTranslator(this);
|
||||
|
@ -140,6 +139,7 @@ bool TranslationHandler::setLanguage(const QString &code)
|
|||
error = error.arg(mTranslations[index].mName);
|
||||
error = error.arg(translationFile);
|
||||
}
|
||||
}
|
||||
|
||||
if (failure) {
|
||||
const QString msg(tr("Failed to change the user interface language:"
|
||||
|
|
Loading…
Reference in New Issue