[vlc-devel] commit: Qt: connect currentChanged signal from model earlier (Jakob Leben )

Ilkka Ollakka ileoo at videolan.org
Wed Jan 27 14:41:09 CET 2010


On Wed, Jan 27, 2010 at 02:27:42PM +0100, git version control wrote:
> vlc | branch: master | Jakob Leben <jleben at videolan.org> | Wed Jan 27 12:49:48 2010 +0100| [4fdd32fab86f3d0a430ed6bc8394007c41d38b7b] | committer: Jakob Leben 

> Qt: connect currentChanged signal from model earlier

> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4fdd32fab86f3d0a430ed6bc8394007c41d38b7b
> ---

> diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
> index abcdb5e..9b96215 100644
> --- a/modules/gui/qt4/components/playlist/standardpanel.cpp
> +++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
> @@ -59,6 +59,8 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
>      setMinimumWidth( 300 );

>      model = new PLModel( p_playlist, p_intf, p_root, this );
> +    CONNECT( model, currentChanged( const QModelIndex& ),
> +             this, handleExpansion( const QModelIndex& ) );

>      iconView = NULL;
>      treeView = NULL;

Are you sure that connectin it that early is good idea? as currentView
is NULL in that point and then handleExpansion triggers assert, if
currentChanged happens before currentView is defined.

-- 
Ilkka Ollakka
"The bland leadeth the bland and they both shall fall into the kitsch."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100127/e9c83944/attachment.sig>


More information about the vlc-devel mailing list