mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Use 'auto' to avoid duplicating the type name
This commit is contained in:
@@ -491,10 +491,11 @@ void AppController::setPreferencesAction()
|
||||
if (m.contains("locale")) {
|
||||
QString locale = m["locale"].toString();
|
||||
if (pref->getLocale() != locale) {
|
||||
QTranslator *translator = new QTranslator;
|
||||
auto *translator = new QTranslator;
|
||||
if (translator->load(QLatin1String(":/lang/qbittorrent_") + locale)) {
|
||||
qDebug("%s locale recognized, using translation.", qUtf8Printable(locale));
|
||||
}else{
|
||||
}
|
||||
else {
|
||||
qDebug("%s locale unrecognized, using default (en).", qUtf8Printable(locale));
|
||||
}
|
||||
qApp->installTranslator(translator);
|
||||
|
||||
Reference in New Issue
Block a user