Commit 1949aee9 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port away from deprecated QStyleOption::init

parent f0c01f76
......@@ -413,7 +413,7 @@ KGradientButton::~KGradientButton()
void KGradientButton::initStyleOption(QStyleOptionButton *opt) const
{
opt->init(this);
opt->initFrom(this);
opt->text.clear();
opt->icon = QIcon();
opt->features = QStyleOptionButton::None;
......@@ -480,7 +480,7 @@ void KGradientButton::paintEvent(QPaintEvent *)
if (hasFocus()) {
QRect focusRect = style()->subElementRect(QStyle::SE_PushButtonFocusRect, &butOpt, this);
QStyleOptionFocusRect focusOpt;
focusOpt.init(this);
focusOpt.initFrom(this);
focusOpt.rect = focusRect;
focusOpt.backgroundColor = palette().window().color();
style()->drawPrimitive(QStyle::PE_FrameFocusRect, &focusOpt, &painter, this);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment