diff --git a/src/gui/transferlistdelegate.cpp b/src/gui/transferlistdelegate.cpp index 57e62f1bb..ba890599c 100644 --- a/src/gui/transferlistdelegate.cpp +++ b/src/gui/transferlistdelegate.cpp @@ -90,11 +90,7 @@ void TransferListDelegate::paint(QPainter *painter, const QStyleOptionViewItem & QStyleOptionViewItem customOption {option}; customOption.state.setFlag(QStyle::State_Enabled, isEnableState(torrentState)); - QColor color = {}; - if (torrentState != TorrentState::Unknown) - { - color = index.data(Qt::ForegroundRole).value(); - } + const QColor color = index.data(Qt::ForegroundRole).value(); m_progressBarPainter.paint(painter, customOption, index.data().toString(), progress, color); }