[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [breeze] kstyle: [kstyle] Fix deprecation warnings
From:       Vlad Zagorodniy <null () kde ! org>
Date:       2018-09-05 9:34:53
Message-ID: E1fxUD7-0006wA-8R () code ! kde ! org
[Download RAW message or body]

Git commit 7e1c0fb1fc3d45c63cbb1c12e75cffc72ed29f0c by Vlad Zagorodniy.
Committed on 05/09/2018 at 09:34.
Pushed by vladz into branch 'master'.

[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

M  +5    -1    kstyle/breezestyle.cpp
M  +4    -0    kstyle/breezewindowmanager.cpp

https://commits.kde.org/breeze/7e1c0fb1fc3d45c63cbb1c12e75cffc72ed29f0c

diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp
index ad3ae6d6..da413673 100644
--- a/kstyle/breezestyle.cpp
+++ b/kstyle/breezestyle.cpp
@@ -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 ) \
                );
diff --git a/kstyle/breezewindowmanager.cpp b/kstyle/breezewindowmanager.cpp
index debbe916..55fe2a16 100644
--- a/kstyle/breezewindowmanager.cpp
+++ b/kstyle/breezewindowmanager.cpp
@@ -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();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic