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

List:       kde-devel
Subject:    Re: [PATCH] Support for activate previous tab in KTabWidget
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2008-09-29 7:19:50
Message-ID: 20080929071949.GB21612 () ugly ! local
[Download RAW message or body]

On Sun, Sep 28, 2008 at 02:02:59PM +0200, Eduardo Robles Elvira wrote:
> I *think* it doesn't break binary compatibility.
> 
i think so, too. ;)

> +++ ktabwidget.cpp	(working copy)
> @@ -60,11 +61,14 @@
> +    // Used when tabCloseActivatePrevious is enabled
> +    QList<QWidget*> m_previousTabList;
>  
QStack preferably.

> +void KTabWidget::Private::removeTab( int index )
> +{
> +  m_previousTabList.removeAll( m_parent->widget( index ) );

> +void KTabWidget::currentChanged( int idx )
> +{
> +   // Maximum number of entries equal to the number of tabs
> +   if(d->m_previousTabList.count() > tabBar()->count())
> +        d->m_previousTabList.removeLast();
>  
the only way to pop from the stack is to delete tabs. consequently it
makes no sense to permit having one tab multiple times. so use
removeOne() above and here before the push().

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Confusion, chaos, panic - my work here is done.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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