mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 21:28:07 -06:00
Fix transfer list architecture
Model returns string for DisplayRole. Text alignment is set by Model (using TextAlignmentRole). Delegate performs custom painting only where necessary (i.e. for Progress bar).
This commit is contained in:
committed by
sledgehammer999
parent
c73f61c8d4
commit
1b9fd85497
@@ -35,11 +35,6 @@ class QModelIndex;
|
||||
class QPainter;
|
||||
class QStyleOptionViewItem;
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
enum class TorrentState;
|
||||
}
|
||||
|
||||
class TransferListDelegate : public QItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -49,9 +44,6 @@ public:
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
QWidget *createEditor(QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const override;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
|
||||
private:
|
||||
QString getStatusString(const BitTorrent::TorrentState state) const;
|
||||
};
|
||||
|
||||
#endif // TRANSFERLISTDELEGATE_H
|
||||
|
||||
Reference in New Issue
Block a user