Commit 6f4519c7 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4: try again to fix the quitting issue

This seems to work on XP, 7 (32+64) and Linux (32+64)

I know it is a hack, but so far, this is the only solution I have found.
parent 5233b6fe
......@@ -173,6 +173,8 @@ void VideoWidget::release( void )
{
msg_Dbg( p_intf, "Video is not needed anymore" );
if(!stable)
return;
assert( stable );
layout->removeWidget( stable );
stable->deleteLater();
......
......@@ -223,6 +223,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
CONNECT( THEDP, toolBarConfUpdated(), this, recreateToolbars() );
CONNECT( this, askToQuit(), THEDP, quit() );
/** END of CONNECTS**/
......@@ -263,6 +264,7 @@ MainInterface::~MainInterface()
if( stackCentralOldWidget == videoWidget )
showTab( bgWidget );
releaseVideoSlot();
#ifdef WIN32
if( himl )
ImageList_Destroy( himl );
......@@ -584,6 +586,7 @@ void MainInterface::releaseVideo( void )
/* Function that is CONNECTED to the previous emit */
void MainInterface::releaseVideoSlot( void )
{
if( videoWidget )
videoWidget->release();
setVideoOnTop( false );
setVideoFullScreen( false );
......@@ -1130,9 +1133,9 @@ void MainInterface::wheelEvent( QWheelEvent *e )
void MainInterface::closeEvent( QCloseEvent *e )
{
e->accept();
hide();
THEDP->quit();
//hide();
e->ignore();
emit askToQuit();
}
void MainInterface::setInterfaceFullScreen( bool fs )
......
......@@ -235,6 +235,7 @@ signals:
void askVideoOnTop( bool );
void minimalViewToggled( bool );
void fullscreenInterfaceToggled( bool );
void askToQuit();
};
......
......@@ -365,8 +365,14 @@ static void Close( vlc_object_t *p_this )
if( !p_sys->b_isDialogProvider )
var_Destroy (pl_Get(p_this), "qt4-iface");
/* And quit */
msg_Dbg( p_intf, "Please die, die, die..." );
QApplication::closeAllWindows();
// QApplication::quit();
QVLCApp::triggerQuit();
msg_Dbg( p_intf, "Please die, die, die 2..." );
vlc_join (p_sys->thread, NULL);
#ifdef Q_WS_X11
free (x11_display);
......@@ -469,9 +475,7 @@ static void *Thread( void *obj )
/* Launch */
app.exec();
/* And quit */
QApplication::closeAllWindows();
msg_Dbg( p_intf, "Exec finished()" );
if (p_mi != NULL)
{
#warning BUG!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment