From 0be521bb25cf6210ad47e42eb7a8eb7638c32442 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sun, 28 Apr 2013 08:45:22 -0300 Subject: Fixed loading the stars when opening with file as argv. minor cleanup Signed-off-by: Tomaz Canabrava --- qt-ui/modeldelegates.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-ui/modeldelegates.cpp') diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp index 1bbf1061b..1ac2f46c6 100644 --- a/qt-ui/modeldelegates.cpp +++ b/qt-ui/modeldelegates.cpp @@ -6,6 +6,7 @@ #include #include +#include void StarWidgetsDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { @@ -13,7 +14,7 @@ void StarWidgetsDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o return; } - int rating = index.model()->data(index, DiveTripModel::DelegatesRole).toInt(); + int rating = index.model()->data(index, Qt::DisplayRole).toInt(); if (option.state & QStyle::State_Selected) painter->fillRect(option.rect, option.palette.highlight()); -- cgit v1.2.3-70-g09d2