summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index bdc3a7576..eb4d8974b 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -436,7 +436,8 @@ QVariant DiveItem::data(int column, int role) const
{
QVariant retVal;
- if (role == Qt::TextAlignmentRole) {
+ switch (role) {
+ case Qt::TextAlignmentRole:
switch (column) {
case DATE: /* fall through */
case SUIT: /* fall through */
@@ -447,9 +448,8 @@ QVariant DiveItem::data(int column, int role) const
retVal = Qt::AlignRight;
break;
}
- }
-
- if (role == Qt::DisplayRole) {
+ break;
+ case Qt::DisplayRole:
switch (column) {
case NR:
retVal = dive->number;
@@ -491,6 +491,7 @@ QVariant DiveItem::data(int column, int role) const
retVal = QString(dive->location);
break;
}
+ break;
}
if(role == STAR_ROLE){