diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -3744,7 +3744,11 @@ 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 @@ 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 ) ); diff --git a/kstyle/breezewindowmanager.cpp b/kstyle/breezewindowmanager.cpp --- a/kstyle/breezewindowmanager.cpp +++ b/kstyle/breezewindowmanager.cpp @@ -758,7 +758,11 @@ // 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();