[vlc-devel] commit: qt4: you don't need to sort on invalid index (Ilkka Ollakka )

Jakob Leben jakob.leben at gmail.com
Tue Aug 18 17:01:40 CEST 2009


On Tue, Aug 18, 2009 at 4:06 PM, Jakob Leben <jakob.leben at gmail.com> wrote:

> On Tue, Aug 18, 2009 at 3:17 PM, git version control <git at videolan.org>wrote:
>
>> vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Aug 18
>> 16:15:28 2009 +0300| [f3f1ab6d4e9f366b6932d560263603b1bca160a4] | committer:
>> Ilkka Ollakka
>>
>> qt4: you don't need to sort on invalid index
>>
>>
> The point is that invalid index means root item. You do need to sort root
> item, right. Maybe I didn't document it enough.
>

To be precise:
always: <root_item> == QModelIndex().
always also: !root_item.isValid().
but maybe not always: if( !item.isValid() ) item == root_item.
So I guess we should use item == QModelIndex() instead of !item.isValid() on
several places.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090818/c6cffed9/attachment.html>


More information about the vlc-devel mailing list