<div class="gmail_quote">On Tue, Aug 18, 2009 at 4:06 PM, Jakob Leben <span dir="ltr"><<a href="mailto:jakob.leben@gmail.com">jakob.leben@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><div class="gmail_quote">On Tue, Aug 18, 2009 at 3:17 PM, git version control <span dir="ltr"><<a href="mailto:git@videolan.org" target="_blank">git@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
vlc | branch: master | Ilkka Ollakka <<a href="mailto:ileoo@videolan.org" target="_blank">ileoo@videolan.org</a>> | Tue Aug 18 16:15:28 2009 +0300| [f3f1ab6d4e9f366b6932d560263603b1bca160a4] | committer: Ilkka Ollakka<br>
<br>
qt4: you don't need to sort on invalid index<br>
<br></blockquote></div><br></div>The point is that invalid index means root item. You do need to sort root item, right. Maybe I didn't document it enough.<br>
</blockquote></div><br>To be precise:<br>
always: <root_item> == QModelIndex().<br>
always also: !root_item.isValid().<br>
but maybe not always: if( !item.isValid() ) item == root_item.<br>
So I guess we should use item == QModelIndex() instead of !item.isValid() on several places.<br>