Commit 1c9669ac authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: fix crash regression in 1.1.5 closeAllWindows() not thread-safe

All UI related operations in Qt4 must be done on the UI thread, as
QtGui is not thread-safe internally.
parent 9a0e0822
......@@ -392,14 +392,10 @@ static void Close( vlc_object_t *p_this )
}
/* And quit */
msg_Dbg( p_intf, "Please die, die, die..." );
QApplication::closeAllWindows();
// QApplication::quit();
msg_Dbg( p_this, "requesting exit..." );
QVLCApp::triggerQuit();
msg_Dbg( p_intf, "Please die, die, die 2..." );
msg_Dbg( p_this, "waiting for UI thread..." );
#ifndef Q_WS_MAC
vlc_join (p_sys->thread, NULL);
#endif
......
......@@ -40,10 +40,17 @@ class QVLCApp : public QApplication
{
Q_OBJECT
private slots:
void doQuit()
{
closeAllWindows();
quit();
}
public:
QVLCApp( int & argc, char ** argv ) : QApplication( argc, argv, true )
{
connect( this, SIGNAL(quitSignal()), this, SLOT(quit()) );
connect( this, SIGNAL(quitSignal()), this, SLOT(doQuit()) );
}
static void triggerQuit()
......
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