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

List:       kde-commits
Subject:    KDE/kdebase/workspace/kstyles/oxygen
From:       Hugo Pereira Da Costa <hugo.pereira () free ! fr>
Date:       2010-10-20 20:33:17
Message-ID: 20101020203317.64FCCAC897 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1187943 by hpereiradacosta:

made check on widget validity more subtle that r1187937, but keeping the spirit.
invalid widget should disable animations checks but not the painting.
double-checked that passing a 0 widget still does not crash the code.
This fixes a systematic crash of openoffice with oxygen from trunk.

CCMAIL: Luboš Luňák <l.lunak@kde.org>


 M  +4 -4      oxygenstyle.cpp  


--- trunk/KDE/kdebase/workspace/kstyles/oxygen/oxygenstyle.cpp #1187942:1187943
@@ -7522,7 +7522,6 @@
     //______________________________________________________________
     bool Style::drawToolButtonComplexControl( const QStyleOptionComplex* option, \
QPainter* painter, const QWidget* widget ) const  {
-        if( !widget ) return false;
 
         // check autoRaise state
         const State flags( option->state );
@@ -7552,9 +7551,10 @@
         }
 
         // toolbar animation
-        const bool toolBarAnimated( isInToolBar && \
                animations().toolBarEngine().isAnimated( widget->parentWidget() ) );
-        const QRect animatedRect( animations().toolBarEngine().animatedRect( \
                widget->parentWidget() ) );
-        const QRect currentRect( animations().toolBarEngine().currentRect( \
widget->parentWidget() ) ); +        QWidget* parent( widget ? \
widget->parentWidget():0 ); +        const bool toolBarAnimated( isInToolBar && \
animations().toolBarEngine().isAnimated( parent ) ); +        const QRect \
animatedRect( animations().toolBarEngine().animatedRect( parent ) ); +        const \
                QRect currentRect( animations().toolBarEngine().currentRect( parent ) \
                );
         const bool current( isInToolBar && currentRect.intersects( rect.translated( \
                widget->mapToParent( QPoint( 0,0 ) ) ) ) );
         const bool toolBarTimerActive( isInToolBar && \
animations().toolBarEngine().isTimerActive( widget->parentWidget() ) );  


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

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