DBus-QT Patch

Jérôme Lodewyck lodewyck at clipper.ens.fr
Thu Sep 2 12:12:20 UTC 2004


hi,

	Here is a patch (applicable in the qt directory) that enables integration of 
a given dbus connection in the qt main loop. It is needed to make a Qt 
application that recieves HAL callbacks.

I hope it can be merged into the cvs tree.

Jérôme Lodewyck
-------------- next part --------------
? dbus-qt-mainloop.patch
Index: connection.cpp
===================================================================
RCS file: /cvs/dbus/dbus/qt/connection.cpp,v
retrieving revision 1.9
diff -r1.9 connection.cpp
158a159,165
> void Connection::dbus_connection_setup_with_qt_main (DBusConnection *connection)
> {
>   d->setConnection( connection );
> }
> 
> 
> 
Index: connection.h
===================================================================
RCS file: /cvs/dbus/dbus/qt/connection.h,v
retrieving revision 1.9
diff -r1.9 connection.h
52a53
>     void dbus_connection_setup_with_qt_main (DBusConnection *connection);
Index: integrator.cpp
===================================================================
RCS file: /cvs/dbus/dbus/qt/integrator.cpp,v
retrieving revision 1.4
diff -r1.4 integrator.cpp
165c165,168
<   Q_UNUSED( fd );
---
>   QIntDictIterator<Watch>	it( m_watches );
>   for ( ; it.current(); ++it )
>     dbus_watch_handle ( it.current()->watch, DBUS_WATCH_READABLE );
> 
171c174,176
<   Q_UNUSED( fd );
---
>   QIntDictIterator<Watch>       it( m_watches );
>   for ( ; it.current(); ++it )
>     dbus_watch_handle ( it.current()->watch, DBUS_WATCH_WRITABLE );


More information about the dbus mailing list