1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-29 09:40:02 +01:00

Remove qstyleoption_cast

This commit is contained in:
Jonas Kvinge 2018-11-16 17:45:57 +01:00
parent f228f79a8a
commit 5927483402

View File

@ -80,8 +80,7 @@ void DeviceItemDelegate::paint(QPainter *p, const QStyleOptionViewItem &opt, con
}
// Draw the background
const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem*>(&opt);
const QWidget *widget = vopt->widget;
const QWidget *widget = opt.widget;
QStyle *style = widget->style() ? widget->style() : QApplication::style();
style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, p, widget);