Commit 7e1c0fb1 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[kstyle] Fix deprecation warnings

Summary: See https://build.kde.org/job/Plasma%20breeze%20kf5-qt5%20FreeBSDQt5.11/4/warnings12Result/

Test Plan: Compiles.

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15285
parent 45ca8d95
......@@ -3744,7 +3744,11 @@ namespace Breeze
const bool hasCustomBackground = viewItemOption->backgroundBrush.style() != Qt::NoBrush && !( state & State_Selected );
const bool hasSolidBackground = !hasCustomBackground || viewItemOption->backgroundBrush.style() == Qt::SolidPattern;
#if BREEZE_USE_KDE4
const bool hasAlternateBackground( viewItemOption->features & QStyleOptionViewItemV2::Alternate );
#else
const bool hasAlternateBackground( viewItemOption->features & QStyleOptionViewItem::Alternate );
#endif
// do nothing if no background is to be rendered
if( !( mouseOver || selected || hasCustomBackground || hasAlternateBackground ) )
......@@ -3756,7 +3760,7 @@ namespace Breeze
else colorGroup = QPalette::Disabled;
// render alternate background
if( viewItemOption && ( viewItemOption->features & QStyleOptionViewItemV2::Alternate ) )
if( hasAlternateBackground )
{
painter->setPen( Qt::NoPen );
painter->setBrush( palette.brush( colorGroup, QPalette::AlternateBase ) );
......
......@@ -758,7 +758,11 @@ namespace Breeze
// gather options to retrieve checkbox subcontrol rect
QStyleOptionGroupBox opt;
opt.initFrom( groupBox );
#if BREEZE_USE_KDE4
if( groupBox->isFlat() ) opt.features |= QStyleOptionFrameV2::Flat;
#else
if( groupBox->isFlat() ) opt.features |= QStyleOptionFrame::Flat;
#endif
opt.lineWidth = 1;
opt.midLineWidth = 0;
opt.text = groupBox->title();
......
Markdown is supported
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