[vlc-devel] [PATCH] qt: menus: fix crash with skins2

Alexandre Janniaux ajanni at videolabs.io
Wed Dec 23 19:44:52 UTC 2020


Hi,

Sure! We just need to create tickets for that, but that's
new features anyway! The patch is mostly to avoid the need
of a full removal before adding back the feature.

>  nice to hear from you ;-)

Nice to hear from you too!

Regards,
--
Alexandre Janniaux
Videolabs

On Wed, Dec 23, 2020 at 03:51:13PM +0100, erwan.tulou at gmail.com wrote:
> Hi Alexandre,
>
>  nice to hear from you ;-)
>
>  The patch is a quick fix to skins2 crashing but also strips skins2 of a
> nice feature which is the MLRecentsModel.
>
>  Ideally, what is needed is a complete evaluation of what the new Qt module
> has to offer and how the skins2 interface can benefit from it.
>
>  One possible route is to merge skins2 as a full Qt application. As of
> today, there are two GUI threads : one for skins2, one for Qt as dialog,
> menu and key accelerator provider. Why not add a skins2 main interface (the
> mi pointer that causes Null dereference), compose it with the skins2 engine,
> and run it all in a single GUI thread. Then why not  reuse all niceties that
> the new Qt module will offer including the new media library as a widget.
>
> Rgds
> Erwan
>
>
> On 23/12/2020 11:36, Alexandre Janniaux wrote:
> > ---
> >   modules/gui/qt/menus/menus.cpp | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/modules/gui/qt/menus/menus.cpp b/modules/gui/qt/menus/menus.cpp
> > index 592fbc103f..af0b0c9eb2 100644
> > --- a/modules/gui/qt/menus/menus.cpp
> > +++ b/modules/gui/qt/menus/menus.cpp
> > @@ -221,7 +221,7 @@ QMenu *VLCMenuBar::FileMenu( intf_thread_t *p_intf, QMenu *menu, MainInterface *
> >       addDPStaticEntry( menu, qtr( "Open &Location from clipboard" ),
> >                         NULL, &DialogsProvider::openUrlDialog, "Ctrl+V" );
> > -    if( var_InheritBool( p_intf, "qt-recentplay" ) && mi->hasMediaLibrary() )
> > +    if( mi && var_InheritBool( p_intf, "qt-recentplay" ) && mi->hasMediaLibrary() )
> >       {
> >           MLRecentsModel* recentModel = new MLRecentsModel(nullptr);
> >           recentModel->setMl(mi->getMediaLibrary());
> > @@ -530,7 +530,7 @@ QMenu *VLCMenuBar::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
> >       menu->addMenu( submenu );
> >       menu->addMenu( new CheckableListMenu( qtr("&Program") , THEMIM->getPrograms(), CheckableListMenu::GROUPED , menu) );
> > -    if (p_intf->p_sys->p_mi->hasMediaLibrary() )
> > +    if (p_intf->p_sys->p_mi && p_intf->p_sys->p_mi->hasMediaLibrary() )
> >       {
> >           submenu = new QMenu( qtr( I_MENU_BOOKMARK ), menu );
> >           submenu->setTearOffEnabled( true );
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list