[Pkg-voip-commits] r8623 - in /qutecom/trunk/debian: changelog patches/series patches/wait-purple.patch
cavedon at alioth.debian.org
cavedon at alioth.debian.org
Mon Sep 6 02:49:10 UTC 2010
Author: cavedon
Date: Mon Sep 6 02:49:09 2010
New Revision: 8623
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=8623
Log:
* Add wait-purple.patch: make Qt thread wait for IMWrapper thread to exit.
Added:
qutecom/trunk/debian/patches/wait-purple.patch
Modified:
qutecom/trunk/debian/changelog
qutecom/trunk/debian/patches/series
Modified: qutecom/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/qutecom/trunk/debian/changelog?rev=8623&op=diff
==============================================================================
--- qutecom/trunk/debian/changelog (original)
+++ qutecom/trunk/debian/changelog Mon Sep 6 02:49:09 2010
@@ -4,6 +4,7 @@
* get-orig.source.sh: no longer need to remove duplicate of tinyurl.
* Add google-breakpad-stat.patch: fix compilation with glibc 2.12.
Closes: #590234.
+ * Add wait-purple.patch: make Qt thread wait for IMWrapper thread to exit.
* Removed pacthes merged/fixed upstream:
- fix-build-newer-ffmpeg.patch
- track-sipaccount-init.patch
@@ -17,7 +18,7 @@
* Remove Rekoo license file from package and insert its text in
debian/copyright.
- -- Ludovico Cavedon <cavedon at debian.org> Sun, 05 Sep 2010 19:38:08 -0700
+ -- Ludovico Cavedon <cavedon at debian.org> Sun, 05 Sep 2010 19:48:46 -0700
qutecom (2.2~rc3.hg396~dfsg1-6) unstable; urgency=low
Modified: qutecom/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/qutecom/trunk/debian/patches/series?rev=8623&op=diff
==============================================================================
--- qutecom/trunk/debian/patches/series (original)
+++ qutecom/trunk/debian/patches/series Mon Sep 6 02:49:09 2010
@@ -5,3 +5,4 @@
google-breakpad-stat.patch
#purple_perl_tcl_noload.patch
#curl-openssl-mt-fix.patch
+wait-purple.patch
Added: qutecom/trunk/debian/patches/wait-purple.patch
URL: http://svn.debian.org/wsvn/pkg-voip/qutecom/trunk/debian/patches/wait-purple.patch?rev=8623&op=file
==============================================================================
--- qutecom/trunk/debian/patches/wait-purple.patch (added)
+++ qutecom/trunk/debian/patches/wait-purple.patch Mon Sep 6 02:49:09 2010
@@ -1,0 +1,116 @@
+Description: Make Qt thread wait for the imwrapper thread to exit.
+Origin: http://lists.qutecom.org/pipermail/qutecom-dev/2010-September/002784.html
+
+Index: qutecom-2.2~rc3.hg643~dfsg1/libs/imwrapper/include/imwrapper/IMWrapperFactory.h
+===================================================================
+--- qutecom-2.2~rc3.hg643~dfsg1.orig/libs/imwrapper/include/imwrapper/IMWrapperFactory.h 2010-08-31 02:07:50.000000000 -0700
++++ qutecom-2.2~rc3.hg643~dfsg1/libs/imwrapper/include/imwrapper/IMWrapperFactory.h 2010-09-05 19:46:06.144079034 -0700
+@@ -23,6 +23,7 @@
+ #include <imwrapper/IMAccount.h>
+
+ #include <util/Interface.h>
++#include <util/Trackable.h>
+
+ class IMChat;
+ class IMConnect;
+@@ -38,9 +39,11 @@
+ * @author Philippe Bernery
+ * @author Tanguy Krotoff
+ */
+-class IMWrapperFactory : Interface {
++class IMWrapperFactory : Interface, public Trackable {
+ public:
+
++ Event<void()> terminatedEvent;
++
+ virtual ~IMWrapperFactory() {
+ }
+
+Index: qutecom-2.2~rc3.hg643~dfsg1/libs/imwrapper/src/purple/PurpleIMFactory.cpp
+===================================================================
+--- qutecom-2.2~rc3.hg643~dfsg1.orig/libs/imwrapper/src/purple/PurpleIMFactory.cpp 2010-08-31 02:07:50.000000000 -0700
++++ qutecom-2.2~rc3.hg643~dfsg1/libs/imwrapper/src/purple/PurpleIMFactory.cpp 2010-09-05 19:46:06.144079034 -0700
+@@ -356,6 +356,7 @@
+ // Don't stop gMainLoop here: this is called when the user logoff, but we
+ // want to keep the loop running for the whole time the application is
+ // running.
++ PurpleIMFactory::getFactory().terminatedEvent();
+ }
+
+ void PurpleIMFactory::terminate() {
+Index: qutecom-2.2~rc3.hg643~dfsg1/wengophone/src/presentation/qt/QtWengoPhone.cpp
+===================================================================
+--- qutecom-2.2~rc3.hg643~dfsg1.orig/wengophone/src/presentation/qt/QtWengoPhone.cpp 2010-08-31 02:07:50.000000000 -0700
++++ qutecom-2.2~rc3.hg643~dfsg1/wengophone/src/presentation/qt/QtWengoPhone.cpp 2010-09-05 19:46:06.179078876 -0700
+@@ -71,6 +71,7 @@
+ #include <model/profile/UserProfile.h>
+
+ #include <imwrapper/EnumPresenceState.h>
++#include <imwrapper/IMWrapperFactory.h>
+
+ #include <qtutil/CloseEventFilter.h>
+ #include <qtutil/Widget.h>
+@@ -111,6 +112,7 @@
+ _chatWindow = NULL;
+ _activeTabBeforeCall = NULL;
+ _qtWebDirectory = NULL;
++ _want_to_exit = false;
+
+ NetworkProxyDiscovery::getInstance().proxyNeedsAuthenticationEvent +=
+ boost::bind(&QtWengoPhone::proxyNeedsAuthenticationEventHandler, this, _1, _2);
+@@ -141,7 +143,15 @@
+ //TODO delete created objects
+ }
+
++void QtWengoPhone::terminatedEventHandler() {
++ if(_want_to_exit)
++ QCoreApplication::exit(EXIT_SUCCESS);
++}
++
+ void QtWengoPhone::initUi() {
++
++ IMWrapperFactory::getFactory().terminatedEvent += boost::bind(&QtWengoPhone::terminatedEventHandler,this);
++
+ // Init parts of the UI which do not rely on Control layer
+ QApplication::setQuitOnLastWindowClosed(false);
+
+@@ -689,6 +699,8 @@
+ ////
+
+ _cWengoPhone.terminate();
++
++ _want_to_exit = true;
+ }
+
+ void QtWengoPhone::phoneComboBoxClicked() {
+@@ -698,7 +710,7 @@
+ }
+
+ void QtWengoPhone::exitEvent() {
+- QCoreApplication::exit(EXIT_SUCCESS);
++ //QCoreApplication::exit(EXIT_SUCCESS);
+ }
+
+ void QtWengoPhone::showHistory() {
+Index: qutecom-2.2~rc3.hg643~dfsg1/wengophone/src/presentation/qt/QtWengoPhone.h
+===================================================================
+--- qutecom-2.2~rc3.hg643~dfsg1.orig/wengophone/src/presentation/qt/QtWengoPhone.h 2010-08-31 02:07:50.000000000 -0700
++++ qutecom-2.2~rc3.hg643~dfsg1/wengophone/src/presentation/qt/QtWengoPhone.h 2010-09-05 19:46:06.183101664 -0700
+@@ -99,6 +99,8 @@
+
+ void connectionStatusEventHandler(int totalSteps, int currentStep, const std::string & infoMsg);
+
++ void terminatedEventHandler();
++
+ QWidget * getWidget() const;
+
+ void setQtDialpad(QtDialpad * qtDialpad);
+@@ -264,6 +266,8 @@
+ std::auto_ptr<QtIMAccountMonitor> _qtIMAccountMonitor;
+
+ QtWebDirectory * _qtWebDirectory;
++
++ bool _want_to_exit;
+ };
+
+ #endif //OWQTWENGOPHONE_H
More information about the Pkg-voip-commits
mailing list