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

List:       kde-commits
Subject:    Re: koffice/lib/kofficeui
From:       Frans Englich <frans.englich () telia ! com>
Date:       2005-12-23 21:11:57
Message-ID: 200512232111.57937.frans.englich () telia ! com
[Download RAW message or body]

On Friday 23 December 2005 20:52, Rob Buis wrote:
> SVN commit 490951 by buis:
>
> Two memleak fixes.

Tip: you're adding Qt 3 specific code here(setAutoDelete), so adding coding 
which works in Qt 4 as well means less porting work.


Cheers,

		Frans

>
>
>  M  +2 -0      kotoolbox.cc
>
>
> --- trunk/koffice/lib/kofficeui/kotoolbox.cc #490950:490951
> @@ -54,6 +54,7 @@
>      m_buttonGroup->setExclusive( true );
>      connect( m_buttonGroup, SIGNAL( pressed( int ) ), this, SLOT(
> slotButtonPressed( int ) ) );
>
> +    m_tools.setAutoDelete( true );
>      // Create separate lists for the various sorts of tools
>      for (int i = 0; i < numberOfTooltypes ; ++i) {
>          ToolList * tl = new ToolList();
> @@ -63,6 +64,7 @@
>
>  KoToolBox::~KoToolBox()
>  {
> +    delete m_buttonGroup;
>  }
[prev in list] [next in list] [prev in thread] [next in thread] 

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