aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/graphicsview-common.cpp2
-rw-r--r--qt-ui/models.cpp14
2 files changed, 7 insertions, 9 deletions
diff --git a/qt-ui/graphicsview-common.cpp b/qt-ui/graphicsview-common.cpp
index 4d96aa8c6..e23691f3f 100644
--- a/qt-ui/graphicsview-common.cpp
+++ b/qt-ui/graphicsview-common.cpp
@@ -74,4 +74,4 @@ QColor getSacColor(int sac, int avg_sac)
if (sac_index > SAC_COLORS - 1)
sac_index = SAC_COLORS - 1;
return getColor((color_indice_t)(SAC_COLORS_START_IDX + sac_index), false);
-} \ No newline at end of file
+}
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 93bc446ef..942be2e5a 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1862,14 +1862,12 @@ QVariant LanguageModel::data(const QModelIndex& index, int role) const
if (!index.isValid())
return QVariant();
switch (role) {
- 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());
- return currentString == "English" ? "en_US" : currentString.remove("subsurface_");
- }break;
+ 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()));
+ }
+ case Qt::UserRole:
+ return currentString == "English" ? "en_US" : currentString.remove("subsurface_");
}
return QVariant();
}