<div class="gmail_quote">On Wed, Jun 23, 2010 at 2:10 PM,  <span dir="ltr"><<a href="mailto:git@videolan.org">git@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
vlc | branch: master | Ilkka Ollakka <<a href="mailto:ileoo@videolan.org">ileoo@videolan.org</a>> | Wed Jun 23 15:09:53 2010 +0300| [7cdb0761b23277f508cefeb5dca4098c9ec4120d] | committer: Ilkka Ollakka<br>
<br>
Qt4: reset current_index cache sametime as i_cache_id<br></blockquote></div><br>A QModelIndex can become invalid even in case when cached PLItem is still valid. For example on D&D move. QModelIndex is not permanent, so would be better to not cache it at all. If anything, input_item_t * should be cached.<br>
<br>Caching of current item in qt4 has recently been removed in development between 1.0.0 and 1.1.0. If you want to know last played item after playing is stopped, then instead of caching, why not ask the playlist directly? If playlist can stop and then continue playing from last played item, then for sure it has the info about the last played item.<br>
<br>Best regards,<br><br>Jakob<br>