Commit 97041456 authored by Harald Fernengel's avatar Harald Fernengel

patch by Jérôme Lodewyck <lodewyck@clipper.ens.fr> to enable integration

of an existing connection into the Qt main loop
parent 4a77a2dd
......@@ -156,6 +156,13 @@ void* Connection::virtual_hook( int, void* )
{
}
void Connection::dbus_connection_setup_with_qt_main (DBusConnection *connection)
{
d->setConnection( connection );
}
/////////////////////////////////////////////////////////
#include "connection.moc"
......@@ -50,6 +50,7 @@ namespace DBusQt {
Message borrowMessage();
Message popMessage();
void stealBorrowMessage( const Message& );
void dbus_connection_setup_with_qt_main (DBusConnection *connection);
public slots:
void open( const QString& );
......
......@@ -162,13 +162,18 @@ Integrator::Integrator( DBusServer *server, QObject *parent )
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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment