|
|
@ -37,10 +37,6 @@ |
|
|
|
#include "base/utils/misc.h" |
|
|
|
#include "base/utils/misc.h" |
|
|
|
#include "searchsortmodel.h" |
|
|
|
#include "searchsortmodel.h" |
|
|
|
|
|
|
|
|
|
|
|
namespace |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
const char i18nContext[] = "SearchListDelegate"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SearchListDelegate::SearchListDelegate(QObject *parent) |
|
|
|
SearchListDelegate::SearchListDelegate(QObject *parent) |
|
|
|
: QItemDelegate(parent) |
|
|
|
: QItemDelegate(parent) |
|
|
@ -63,7 +59,7 @@ void SearchListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op |
|
|
|
case SearchSortModel::LEECHES: |
|
|
|
case SearchSortModel::LEECHES: |
|
|
|
opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter; |
|
|
|
opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter; |
|
|
|
QItemDelegate::drawDisplay(painter, opt, option.rect |
|
|
|
QItemDelegate::drawDisplay(painter, opt, option.rect |
|
|
|
, (index.data().toLongLong() >= 0) ? index.data().toString() : QCoreApplication::translate(i18nContext, "Unknown")); |
|
|
|
, (index.data().toLongLong() >= 0) ? index.data().toString() : tr("Unknown")); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
QItemDelegate::paint(painter, option, index); |
|
|
|
QItemDelegate::paint(painter, option, index); |
|
|
|