From kde-devel Mon Sep 29 07:19:50 2008 From: Oswald Buddenhagen Date: Mon, 29 Sep 2008 07:19:50 +0000 To: kde-devel Subject: Re: [PATCH] Support for activate previous tab in KTabWidget Message-Id: <20080929071949.GB21612 () ugly ! local> X-MARC-Message: https://marc.info/?l=kde-devel&m=122267283203949 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 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 <<