mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Make BitTorrent::TorrentState strongly-typed enum
This is needed to forward declare this type and pass it by value. Conversion from/to QVariant are hanled via Q_DECLARE_METATYPE, while TorrentState::toString() function was used in webui only and as such is moved there.
This commit is contained in:
@@ -39,6 +39,10 @@ class QStyleOptionViewItem;
|
||||
class QModelIndex;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
enum class TorrentState;
|
||||
}
|
||||
// Defines for download list list columns
|
||||
|
||||
class TransferListDelegate: public QItemDelegate
|
||||
@@ -52,7 +56,7 @@ public:
|
||||
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const;
|
||||
|
||||
private:
|
||||
QString getStatusString(const int state) const;
|
||||
QString getStatusString(const BitTorrent::TorrentState state) const;
|
||||
};
|
||||
|
||||
#endif // TRANSFERLISTDELEGATE_H
|
||||
|
||||
Reference in New Issue
Block a user