1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-12 15:57:57 +00:00

Fix strings not translated

Closes #9934.
This commit is contained in:
Chocobo1 2018-11-28 10:55:22 +08:00
parent 5efdd211cc
commit 0ad831e48a
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
2 changed files with 3 additions and 5 deletions

View File

@ -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);

View File

@ -33,6 +33,8 @@
class SearchListDelegate : public QItemDelegate class SearchListDelegate : public QItemDelegate
{ {
Q_OBJECT
public: public:
explicit SearchListDelegate(QObject *parent); explicit SearchListDelegate(QObject *parent);