From 759ff9bf1ba38a47214849bc0a80cfbc7333c3a9 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Sun, 1 Mar 2015 18:19:10 +0100 Subject: [PATCH 2/4] Check scrollbar policy before forwarding events BUG: 343659 --- kstyle/breezestyle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index 818eaec5e9a0143aa8bec778c620735aabbeb71c..6caa00b7259b44ac38f8db206df1317d2edafbc9 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -1002,8 +1002,9 @@ namespace Breeze QList scrollBars; if( QAbstractScrollArea* scrollArea = qobject_cast( widget ) ) { - scrollBars.append( scrollArea->horizontalScrollBar() ); - scrollBars.append( scrollArea->verticalScrollBar() ); + + if( scrollArea->horizontalScrollBarPolicy() != Qt::ScrollBarAlwaysOff ) scrollBars.append( scrollArea->horizontalScrollBar() ); + if( scrollArea->verticalScrollBarPolicy() != Qt::ScrollBarAlwaysOff )scrollBars.append( scrollArea->verticalScrollBar() ); } else if( widget->inherits( "KTextEditor::View" ) ) { @@ -5440,7 +5441,6 @@ namespace Breeze const bool hasPopupMenu( toolButtonOption->subControls & SC_ToolButtonMenu ); const bool hasInlineIndicator( toolButtonOption->features & QStyleOptionToolButton::HasMenu && !hasPopupMenu ); - const QRect buttonRect( subControlRect( CC_ToolButton, option, SC_ToolButton, widget ) ); const QRect menuRect( subControlRect( CC_ToolButton, option, SC_ToolButtonMenu, widget ) ); -- 2.3.0