mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Whitespace and dead code cleanup
The coding style for switch isn't the prettiest, but let's at least keep things consistent. Also, those ugly break statements never got reached, anyway. And there was no need to re-declare and re-generate currentString. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9c9867dec5
commit
6332976c3d
2 changed files with 7 additions and 9 deletions
|
@ -1865,11 +1865,9 @@ QVariant LanguageModel::data(const QModelIndex& index, int role) const
|
|||
case Qt::DisplayRole: {
|
||||
QLocale l( currentString.remove("subsurface_"));
|
||||
return currentString == "English" ? currentString : QString("%1 (%2)").arg(l.languageToString(l.language())).arg(l.countryToString(l.country()));
|
||||
}break;
|
||||
case Qt::UserRole: {
|
||||
QString currentString = languages.at(index.row());
|
||||
}
|
||||
case Qt::UserRole:
|
||||
return currentString == "English" ? "en_US" : currentString.remove("subsurface_");
|
||||
}break;
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue