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

List:       kde-core-devel
Subject:    KToolBarButton patch
From:       Albert Astals Cid <astals11 () terra ! es>
Date:       2005-03-29 16:11:17
Message-ID: 200503291811.18203.astals11 () terra ! es
[Download RAW message or body]

Hi, this patch fixes a crash in Umbrello (clicking on the button with the [x] 
on the tabwidget) because they are using a KToolBarButton inside a KTabWidget 
so d->m_parent is null

Is this patch ok to commit or should Umbrello guys fix their code?

Albert

["ktoolbarbutton.patch" (text/x-diff)]

? ktoolbarbutton.patch
Index: ktoolbarbutton.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/ktoolbarbutton.cpp,v
retrieving revision 1.88
diff -u -r1.88 ktoolbarbutton.cpp
--- ktoolbarbutton.cpp	17 Feb 2005 18:32:37 -0000	1.88
+++ ktoolbarbutton.cpp	29 Mar 2005 16:07:15 -0000
@@ -655,7 +655,7 @@
   emit clicked( d->m_id );
 
   // emit buttonClicked when the button was clicked while being in an extension popupmenu
-  if ( !d->m_parent->rect().contains( geometry() ) ) {
+  if ( d->m_parent && !d->m_parent->rect().contains( geometry() ) ) {
     ButtonState state = KApplication::keyboardMouseState();
     if ( ( state & MouseButtonMask ) == NoButton )
       state = ButtonState( LeftButton | state );


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

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