[Patch] Fix some minor annoyances with TagDialogs

Aneurin Price aneurin.price at gmail.com
Sat Mar 1 17:33:24 CET 2008


Jeff Mitchell wrote:
> Aneurin Price wrote:
>> Currently when editing tracks on a per-track basis in the TagDialog, 
>> clicking next at the beginning of the playlist doesn't advance the 
>> track on the first click, and similarly with previous at the end of 
>> the playlist. The same thing happens if you change the traversal 
>> direction (eg. next, next, previous - you need to click previous 
>> again before it will go back).
>> This is because the track list is accessed using a Java-style 
>> iterator. From Qt docs:
>> "Unlike STL-style iterators, Java-style iterators point *between* 
>> items rather than directly *at* items."
> Nye--
>
> If the issue is non-STL style iterators, would it be better to just 
> change m_trackIterator from a QListIterator to a QList::iterator 
> instead?  i.e. accessed from QList::begin/QList::const_begin etc.  
> Those are STL style.
>
> --Jeff
>
>
>
>
>
Very possibly. I see the patch has now gone in, but if you'd prefer, 
here is a change to STL style iterators, which has the virtue of 
requiring a little less code (applies to current SVN).


- Nye

(PS. This uses non-const iterators because list.constBegin() doesn't 
always seem to return the same value, even when the list hasn't been 
changed, making comparisons difficult. Maybe I'm missing something)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tagdialog-cleanup2.diff
Type: text/x-diff
Size: 3944 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20080301/a84f700b/attachment-0001.bin 


More information about the Amarok-devel mailing list