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