Remove setBaseStyle()

This commit is contained in:
Jonas Kvinge 2020-02-22 13:43:33 +01:00
parent ec46c758ba
commit 469e00b396
3 changed files with 3 additions and 11 deletions

View File

@ -64,7 +64,6 @@ MoodbarProxyStyle::MoodbarProxyStyle(Application* app, QSlider* slider)
show_moodbar_action_(nullptr),
style_action_group_(nullptr) {
setBaseStyle(slider->style());
slider->setStyle(this);
slider->installEventFilter(this);

View File

@ -89,13 +89,7 @@ const int PlaylistView::kAutoscrollGraceTimeout = 30; // seconds
const int PlaylistView::kDropIndicatorWidth = 2;
const int PlaylistView::kDropIndicatorGradientWidth = 5;
PlaylistProxyStyle::PlaylistProxyStyle(QStyle *base)
: QProxyStyle(nullptr),
common_style_(new QCommonStyle) {
setBaseStyle(base);
}
PlaylistProxyStyle::PlaylistProxyStyle() : QProxyStyle(nullptr), common_style_(new QCommonStyle) {}
void PlaylistProxyStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const {
@ -139,7 +133,7 @@ void PlaylistProxyStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
PlaylistView::PlaylistView(QWidget *parent)
: QTreeView(parent),
app_(nullptr),
style_(new PlaylistProxyStyle(style())),
style_(new PlaylistProxyStyle()),
playlist_(nullptr),
header_(new PlaylistHeader(Qt::Horizontal, this, this)),
background_image_type_(AppearanceSettingsPage::BackgroundImageType_Default),

View File

@ -40,7 +40,6 @@
#include <QPixmap>
#include <QRect>
#include <QRegion>
#include <QStyle>
#include <QStyleOption>
#include <QProxyStyle>
#include <QPoint>
@ -80,7 +79,7 @@ class PlaylistHeader;
// This class is used by internet search view as well.
class PlaylistProxyStyle : public QProxyStyle {
public:
PlaylistProxyStyle(QStyle *base);
PlaylistProxyStyle();
void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const;
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const;