[vlc-devel] [PATCH 3/3] Qt: Use the abort function to stop main thread on Mac
Juho Vähä-Herttua
juhovh at iki.fi
Sat Jul 31 17:47:33 CEST 2010
---
modules/gui/qt4/qt4.cpp | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 9582a80..3bf427e 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -62,6 +62,7 @@ static void Close ( vlc_object_t * );
static int WindowOpen ( vlc_object_t * );
static void WindowClose ( vlc_object_t * );
static void *Thread ( void * );
+static void Abort ( intf_thread_t *p_intf );
static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
/*****************************************************************************
@@ -331,6 +332,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
/* Run mainloop thread on first thread instead */
p_intf->b_should_run_on_first_thread = true;
p_intf->pf_run = (void(*)(intf_thread_t *))Thread;
+ p_intf->pf_abort = Abort;
#else
if( vlc_clone( &p_sys->thread, Thread, p_intf, VLC_THREAD_PRIORITY_LOW ) )
{
@@ -536,6 +538,11 @@ static void *Thread( void *obj )
return NULL;
}
+static void Abort( intf_thread_t *p_intf )
+{
+ QVLCApp::triggerQuit();
+}
+
/*****************************************************************************
* Callback to show a dialog
*****************************************************************************/
--
1.6.5.7
More information about the vlc-devel
mailing list