mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
code review
This commit is contained in:
parent
9fc3d82ca8
commit
b0d1b6a1fb
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@
|
|||
TransferListDelegate::TransferListDelegate(QObject *parent)
|
||||
: QStyledItemDelegate {parent}
|
||||
{
|
||||
m_stateThemeColors = m_stateThemeColors = Utils::Gui::torrentStateToColorHash();
|
||||
m_stateThemeColors = Utils::Gui::torrentStateToColorHash();
|
||||
}
|
||||
|
||||
QWidget *TransferListDelegate::createEditor(QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const
|
||||
|
@ -92,7 +92,7 @@ void TransferListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
QStyleOptionViewItem customOption {option};
|
||||
customOption.state.setFlag(QStyle::State_Enabled, isEnableState(torrentState));
|
||||
|
||||
QColor color = nullptr;
|
||||
QColor color = {};
|
||||
if (torrentState != TorrentState::Unknown)
|
||||
{
|
||||
color = m_stateThemeColors.value(torrentState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue