mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
Improve coding style
This commit is contained in:
@@ -54,12 +54,14 @@ void PreviewListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
|
||||
QStyleOptionViewItem opt = QItemDelegate::setOptions(index, option);
|
||||
drawBackground(painter, opt, index);
|
||||
|
||||
switch (index.column()) {
|
||||
switch (index.column())
|
||||
{
|
||||
case PreviewSelectDialog::SIZE:
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong()));
|
||||
break;
|
||||
|
||||
case PreviewSelectDialog::PROGRESS: {
|
||||
case PreviewSelectDialog::PROGRESS:
|
||||
{
|
||||
const qreal progress = (index.data().toReal() * 100);
|
||||
|
||||
QStyleOptionProgressBar newopt;
|
||||
|
||||
Reference in New Issue
Block a user