diff options
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 061ffe418..bdc3a7576 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -490,11 +490,17 @@ QVariant DiveItem::data(int column, int role) const case LOCATION: retVal = QString(dive->location); break; - case RATING: - retVal = dive->rating; - break; } } + + if(role == STAR_ROLE){ + retVal = dive->rating; + } + + if(role == DIVE_ROLE){ + retVal = QVariant::fromValue<void*>(dive); + } + return retVal; } |