dbus/qt connection.cpp, 1.9, 1.10 connection.h, 1.9, 1.10 integrator.cpp, 1.4, 1.5

Harald Fernengel harry at freedesktop.org
Sat Sep 4 08:09:51 PDT 2004


Update of /cvs/dbus/dbus/qt
In directory gabe:/tmp/cvs-serv22245

Modified Files:
	connection.cpp connection.h integrator.cpp 
Log Message:
patch by Jérôme Lodewyck <lodewyck at clipper.ens.fr> to enable integration
of an existing connection into the Qt main loop


Index: connection.cpp
===================================================================
RCS file: /cvs/dbus/dbus/qt/connection.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- connection.cpp	4 May 2004 05:35:48 -0000	1.9
+++ connection.cpp	4 Sep 2004 15:09:48 -0000	1.10
@@ -156,6 +156,13 @@
 {
 }
 
+void Connection::dbus_connection_setup_with_qt_main (DBusConnection *connection)
+{
+  d->setConnection( connection );
+}
+
+
+
 /////////////////////////////////////////////////////////
 
 #include "connection.moc"

Index: connection.h
===================================================================
RCS file: /cvs/dbus/dbus/qt/connection.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- connection.h	10 Aug 2004 03:07:01 -0000	1.9
+++ connection.h	4 Sep 2004 15:09:48 -0000	1.10
@@ -50,6 +50,7 @@
     Message borrowMessage();
     Message popMessage();
     void stealBorrowMessage( const Message& );
+    void dbus_connection_setup_with_qt_main (DBusConnection *connection);
 
   public slots:
     void open( const QString& );

Index: integrator.cpp
===================================================================
RCS file: /cvs/dbus/dbus/qt/integrator.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- integrator.cpp	2 Dec 2003 10:44:22 -0000	1.4
+++ integrator.cpp	4 Sep 2004 15:09:48 -0000	1.5
@@ -162,13 +162,18 @@
 
 void Integrator::slotRead( int fd )
 {
-  Q_UNUSED( fd );
+  QIntDictIterator<Watch>	it( m_watches );
+  for ( ; it.current(); ++it )
+    dbus_watch_handle ( it.current()->watch, DBUS_WATCH_READABLE );
+
   emit readReady();
 }
 
 void Integrator::slotWrite( int fd )
 {
-  Q_UNUSED( fd );
+  QIntDictIterator<Watch>       it( m_watches );
+  for ( ; it.current(); ++it )
+    dbus_watch_handle ( it.current()->watch, DBUS_WATCH_WRITABLE );
 }
 
 void Integrator::slotTimeout( DBusTimeout *timeout )



More information about the dbus-commit mailing list