rpms/arts/FC-6 arts-1.5.7-qtmcop-notifications-on-demand.patch, NONE, 1.1 .cvsignore, 1.28, 1.29 arts.spec, 1.67, 1.68 sources, 1.31, 1.32

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Jun 5 13:23:15 UTC 2007


Author: than

Update of /cvs/dist/rpms/arts/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv28831

Modified Files:
	.cvsignore arts.spec sources 
Added Files:
	arts-1.5.7-qtmcop-notifications-on-demand.patch 
Log Message:
1.5.7


arts-1.5.7-qtmcop-notifications-on-demand.patch:
 mcop/iomanager.cc    |   12 +++++++++---
 mcop/notification.cc |   12 ++++++++++++
 mcop/notification.h  |    5 +----
 qtmcop/qiomanager.cc |   29 ++++++++++-------------------
 4 files changed, 32 insertions(+), 26 deletions(-)

--- NEW FILE arts-1.5.7-qtmcop-notifications-on-demand.patch ---
Index: mcop/notification.h
===================================================================
--- mcop/notification.h	(Revision 667003)
+++ mcop/notification.h	(Revision 667004)
@@ -72,10 +72,7 @@
 	{
 		return instance;
 	}
-	inline void send(Notification wm)
-	{
-		todo.push(wm);
-	}
+	void send(Notification wm);
 	inline bool pending()
 	{
 		return !todo.empty();
Index: mcop/iomanager.cc
===================================================================
--- mcop/iomanager.cc	(Revision 667003)
+++ mcop/iomanager.cc	(Revision 667004)
@@ -409,9 +409,15 @@
 
 void StdIOManager::addTimer(int milliseconds, TimeNotify *notify)
 {
-	timeList.push_back(new TimeWatcher(milliseconds,notify));
-	timeListChanged = true;
-	Dispatcher::wakeUp();
+	if (milliseconds == -1 && notify == 0) {
+		// HACK: in order to not add a virtual function to IOManager we're calling addTimer with
+		// magic values. This call tells the ioManager that notifications are pending and
+		// NotificationManager::run() should get called soon.
+	} else {
+		timeList.push_back(new TimeWatcher(milliseconds,notify));
+		timeListChanged = true;
+		Dispatcher::wakeUp();
+	}
 }
 
 void StdIOManager::removeTimer(TimeNotify *notify)
Index: mcop/notification.cc
===================================================================
--- mcop/notification.cc	(Revision 667003)
+++ mcop/notification.cc	(Revision 667004)
@@ -22,6 +22,7 @@
 
 #include "notification.h"
 #include "debug.h"
+#include "dispatcher.h"
 
 using namespace Arts;
 
@@ -41,6 +42,17 @@
 	instance = 0;
 }
 
+void NotificationManager::send(Notification wm)
+{
+	if (todo.empty()) {
+		// HACK: in order to not add a virtual function to IOManager we're calling addTimer with
+		// magic values. This call tells the ioManager that notifications are pending and
+		// NotificationManager::run() should get called soon.
+		Arts::Dispatcher::the()->ioManager()->addTimer(-1, 0);
+	}
+	todo.push(wm);
+}
+
 bool NotificationManager::run()
 {
 	if(todo.empty()) return false;
Index: qtmcop/qiomanager.cc
===================================================================
--- qtmcop/qiomanager.cc	(Revision 667003)
+++ qtmcop/qiomanager.cc	(Revision 667004)
@@ -102,30 +102,13 @@
 
 class HandleNotifications : public TimeNotify {
 public:
-	HandleNotifications()
-	{
-		Arts::Dispatcher::the()->ioManager()->addTimer(50, this);
-	}
 	void notifyTime()
 	{
+		Arts::Dispatcher::the()->ioManager()->removeTimer(this);
 		NotificationManager::the()->run();
+		delete this;
 	}
-	virtual ~HandleNotifications()
-	{
-		Arts::Dispatcher::the()->ioManager()->removeTimer(this);
-	}
 };
-
-class HandleNotificationsStartup :public StartupClass
-{
-public:
-	void startup()	{ h = new HandleNotifications(); }
-	void shutdown()	{ delete h; }
-private:
-	HandleNotifications *h;
-};
-static HandleNotificationsStartup handleNotifications;
-
 }
 
 /*
@@ -237,6 +220,14 @@
 
 void QIOManager::addTimer(int milliseconds, TimeNotify *notify)
 {
+	if (milliseconds == -1 && notify == 0)
+	{
+		// HACK: in order to not add a virtual function to IOManager we're calling addTimer with
+		// magic values. This call tells the ioManager that notifications are pending and
+		// NotificationManager::run() should get called soon.
+		notify = new HandleNotifications();
+		milliseconds = 0;
+	}
 	timeList.push_back(new QTimeWatch(milliseconds,notify));
 }
 


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/arts/FC-6/.cvsignore,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- .cvsignore	25 Oct 2006 12:16:19 -0000	1.28
+++ .cvsignore	5 Jun 2007 13:23:13 -0000	1.29
@@ -12,3 +12,4 @@
 arts-1.5.3.tar.bz2
 arts-1.5.4.tar.bz2
 arts-1.5.5.tar.bz2
+arts-1.5.7.tar.bz2


Index: arts.spec
===================================================================
RCS file: /cvs/dist/rpms/arts/FC-6/arts.spec,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- arts.spec	29 Jan 2007 15:17:13 -0000	1.67
+++ arts.spec	5 Jun 2007 13:23:13 -0000	1.68
@@ -7,7 +7,7 @@
 
 %define make_cvs 1
 
-Version: 1.5.6
+Version: 1.5.7
 Release: 0.1%{?dist}
 Summary: aRts (analog realtime synthesizer) - the KDE sound system
 Name: arts
@@ -26,6 +26,9 @@
 Patch7: arts-1.5.0-check_tmp_dir.patch
 Patch8: arts-1.5.2-multilib.patch
 
+# upstream patches
+Patch100: arts-1.5.7-qtmcop-notifications-on-demand.patch
+
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 Requires: audiofile
@@ -93,6 +96,9 @@
 %patch7 -p1 -b .check_tmp_dir
 %patch8 -p1 -b .multilib
 
+# upstream patches
+%patch100 -p0 -b .qtmcop-notifications-on-demand
+
 %build
 unset QTDIR && . /etc/profile.d/qt.sh
 
@@ -163,6 +169,9 @@
 %{_libdir}/lib*.so
 
 %changelog
+* Tue Jun 05 2007 Than Ngo <than at redhat.com> - 6:1.5.7-0.1.fc6
+- 1.5.7
+
 * Wed Jan 24 2007 Than Ngo <than at redhat.com> - 6:1.5.6-0.1.fc6
 - 1.5.6
 


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/arts/FC-6/sources,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- sources	29 Jan 2007 15:17:13 -0000	1.31
+++ sources	5 Jun 2007 13:23:13 -0000	1.32
@@ -1 +1 @@
-e986393a5827499bbad04a00b797add0  arts-1.5.6.tar.bz2
+28ac10541e5d8daf9009f6af1f7857af  arts-1.5.7.tar.bz2




More information about the fedora-cvs-commits mailing list