Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
KmPlot
Commits
1949aee9
Commit
1949aee9
authored
Oct 17, 2022
by
Nicolas Fella
Browse files
Port away from deprecated QStyleOption::init
parent
f0c01f76
Changes
1
Hide whitespace changes
Inline
Side-by-side
kmplot/kgradientdialog.cpp
View file @
1949aee9
...
...
@@ -413,7 +413,7 @@ KGradientButton::~KGradientButton()
void
KGradientButton
::
initStyleOption
(
QStyleOptionButton
*
opt
)
const
{
opt
->
init
(
this
);
opt
->
init
From
(
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
.
init
From
(
this
);
focusOpt
.
rect
=
focusRect
;
focusOpt
.
backgroundColor
=
palette
().
window
().
color
();
style
()
->
drawPrimitive
(
QStyle
::
PE_FrameFocusRect
,
&
focusOpt
,
&
painter
,
this
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment