[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Bugs in KComboBox
From: Andrew Coles <andrew_coles () yahoo ! co ! uk>
Date: 2004-11-11 16:06:07
Message-ID: 200411111606.07217.andrew_coles () yahoo ! co ! uk
[Download RAW message or body]
On Thursday 11 Nov 2004 15:48, Waldo Bastian wrote:
> > Solution - ditch the call to removeItem(i) and call clear() after the for
> > loop has completed.
>
> That would ignore the if ( text( i ) == item ) test.
Phew, I thought I'd ask as I had a feeling it would be subtly broken even
though I couldn't see where myself....
So using:
int i = 0;
while (i < count() ) {
if ( text( i ) == item ) {
if ( !wasCurrent )
wasCurrent = ( i == currentItem() );
removeItem( i );
} else {
++i;
}
}
would be a valid fix then, i.e. respects the (text(i) == item) test.
Thanks for the pointers,
Andrew
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic