mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -06:00
Fix translation context.
Partially addresses #8220. Also sort include headers
This commit is contained in:
@@ -28,14 +28,20 @@
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#include <QStyleOptionViewItem>
|
||||
#include <QCoreApplication>
|
||||
#include <QModelIndex>
|
||||
#include <QPainter>
|
||||
#include <QProgressBar>
|
||||
#include <QStyleOptionViewItem>
|
||||
|
||||
#include "base/utils/misc.h"
|
||||
#include "searchsortmodel.h"
|
||||
#include "searchlistdelegate.h"
|
||||
#include "searchsortmodel.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
const char i18nContext[] = "SearchListDelegate";
|
||||
}
|
||||
|
||||
SearchListDelegate::SearchListDelegate(QObject *parent)
|
||||
: QItemDelegate(parent)
|
||||
@@ -57,7 +63,8 @@ void SearchListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op
|
||||
case SearchSortModel::SEEDS:
|
||||
case SearchSortModel::LEECHES:
|
||||
opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter;
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, (index.data().toLongLong() >= 0) ? index.data().toString() : tr("Unknown"));
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect
|
||||
, (index.data().toLongLong() >= 0) ? index.data().toString() : QCoreApplication::translate(i18nContext, "Unknown"));
|
||||
break;
|
||||
default:
|
||||
QItemDelegate::paint(painter, option, index);
|
||||
|
||||
Reference in New Issue
Block a user