Commit d8b9ccd2 authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Simpify return after else statements

parent 90c81d0e
......@@ -71,10 +71,9 @@ bool KeyboardTranslatorManager::deleteTranslator(const QString &name)
if (QFile::remove(path)) {
_translators.remove(name);
return true;
} else {
qCDebug(KonsoleDebug) << "Failed to remove translator - " << path;
return false;
}
}
qCDebug(KonsoleDebug) << "Failed to remove translator - " << path;
return false;
}
bool KeyboardTranslatorManager::isTranslatorDeletable(const QString &name) const
......@@ -200,10 +199,9 @@ KeyboardTranslator *KeyboardTranslatorManager::loadTranslator(QIODevice *source,
if (!reader.parseError()) {
return translator;
} else {
delete translator;
return nullptr;
}
}
delete translator;
return nullptr;
}
const KeyboardTranslator *KeyboardTranslatorManager::defaultTranslator()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment