<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello, Erwan Tulou<br>
<br>
git version control wrote:
<blockquote cite="mid:20090317161141.7628934F61@skanda.videolan.org"
type="cite">
<pre wrap="">vlc | branch: master | Erwan Tulou <a class="moz-txt-link-rfc2396E" href="mailto:brezhoneg1@yahoo.fr"><brezhoneg1@yahoo.fr></a> | Sat Mar 14 11:13:40 2009 +0100| [ed9fae5e469fe0fcae7c1fac1ee0a31c62e968fb] | committer: Rémi Denis-Courmont
at qt4 termination, ensure quit() function is executed in the right thread
Signed-off-by: Rémi Denis-Courmont <a class="moz-txt-link-rfc2396E" href="mailto:remi@remlab.net"><remi@remlab.net></a>
</pre>
<blockquote type="cite">
<pre wrap=""><a class="moz-txt-link-freetext" href="http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed9fae5e469fe0fcae7c1fac1ee0a31c62e968fb">http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed9fae5e469fe0fcae7c1fac1ee0a31c62e968fb</a>
</pre>
</blockquote>
<pre wrap=""><!---->---
</pre>
</blockquote>
<br>
Thanks so much.<br>
Ticket #1940 is now fixed.<br>
<br>
<blockquote cite="mid:20090317161141.7628934F61@skanda.videolan.org"
type="cite">
<pre wrap="">
modules/gui/qt4/Modules.am | 1 +
modules/gui/qt4/qt4.cpp | 2 +-
modules/gui/qt4/qt4.hpp | 4 ++--
modules/gui/qt4/util/qvlcapp.hpp | 20 +++++++++++++++++++-
4 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/Modules.am b/modules/gui/qt4/Modules.am
index f118476..ce0f73e 100644
--- a/modules/gui/qt4/Modules.am
+++ b/modules/gui/qt4/Modules.am
@@ -57,6 +57,7 @@ nodist_SOURCES_qt4 = \
components/sout/sout_widgets.moc.cpp \
util/input_slider.moc.cpp \
util/customwidgets.moc.cpp \
+ util/qvlcapp.moc.cpp \
resources.cpp \
ui/equalizer.h \
ui/v4l2.h \
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 7a07f71..5aae67c 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -329,7 +329,7 @@ static void Close( vlc_object_t *p_this )
intf_sys_t *p_sys = p_intf->p_sys;
var_Destroy (p_this->p_libvlc, "qt4-iface");
- QApplication::quit();
+ QVLCApp::triggerQuit();
vlc_join (p_sys->thread, NULL);
#ifdef Q_WS_X11
diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp
index 62a26c5..9077cb9 100644
--- a/modules/gui/qt4/qt4.hpp
+++ b/modules/gui/qt4/qt4.hpp
@@ -52,7 +52,7 @@ enum {
MsgEventType = 300,
};
-class QApplication;
+class QVLCApp;
class QMenu;
class MainInterface;
class QSettings;
@@ -61,7 +61,7 @@ struct intf_sys_t
{
vlc_thread_t thread;
- QApplication *p_app; /* Main Qt Application */
+ QVLCApp *p_app; /* Main Qt Application */
MainInterface *p_mi; /* Main Interface, NULL if DialogProvider Mode */
QSettings *mainSettings; /* Qt State settings not messing main VLC ones */
diff --git a/modules/gui/qt4/util/qvlcapp.hpp b/modules/gui/qt4/util/qvlcapp.hpp
index b2a2ad6..905a415 100644
--- a/modules/gui/qt4/util/qvlcapp.hpp
+++ b/modules/gui/qt4/util/qvlcapp.hpp
@@ -30,13 +30,26 @@
class QVLCApp : public QApplication
{
+ Q_OBJECT
+
public:
- QVLCApp( int & argc, char ** argv ) : QApplication( argc, argv, true ) { }
+ QVLCApp( int & argc, char ** argv ) : QApplication( argc, argv, true )
+ {
+ connect( this, SIGNAL(quitSignal()), this, SLOT(quit()) );
+ }
+
+ static void triggerQuit()
+ {
+ QVLCApp *app = qobject_cast<QVLCApp*>( instance() );
+ if ( app )
+ emit app->quitSignal();
+ }
#if defined (Q_WS_X11)
QVLCApp( Display *dp, int & argc, char ** argv )
: QApplication( dp, argc, argv )
{
+ connect( this, SIGNAL(quitSignal()), this, SLOT(quit()) );
}
#endif
@@ -54,6 +67,11 @@ protected:
return false;
}
#endif
+
+
+signals:
+ void quitSignal();
+
};
#endif
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
<a class="moz-txt-link-freetext" href="http://mailman.videolan.org/listinfo/vlc-devel">http://mailman.videolan.org/listinfo/vlc-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>