@ -339,6 +339,29 @@ bool TQT_DBusConnectionPrivate::handleError()
return lastError . isValid ( ) ;
}
bool TQT_DBusConnectionPrivate : : handleUnreadMessages ( )
{
bool res = true ;
WatcherHash : : iterator it = watchers . begin ( ) ;
while ( it ! = watchers . end ( ) )
{
WatcherList & list = * it ;
WatcherList : : iterator listIt = list . begin ( ) ;
while ( listIt ! = list . end ( ) )
{
Watcher watcher = * listIt ;
if ( watcher . read )
{
socketRead ( watcher . read - > socket ( ) ) ;
res & = ( ! handleError ( ) ) ;
}
+ + listIt ;
}
+ + it ;
}
return res ;
}
void TQT_DBusConnectionPrivate : : emitPendingCallReply ( const TQT_DBusMessage & message )
{
emit dbusPendingCallReply ( message ) ;
@ -565,8 +588,6 @@ void TQT_DBusConnectionPrivate::setConnection(DBusConnection *dbc)
qDBusToggleWatch , this , 0 ) ;
dbus_connection_set_timeout_functions ( connection , qDBusAddTimeout , qDBusRemoveTimeout ,
qDBusToggleTimeout , this , 0 ) ;
// dbus_bus_add_match(connection, "type='signal',interface='com.trolltech.dbus.Signal'", &error);
// dbus_bus_add_match(connection, "type='signal'", &error);
dbus_bus_add_match ( connection , " type='signal' " , & error ) ;
if ( handleError ( ) ) {
@ -579,7 +600,7 @@ void TQT_DBusConnectionPrivate::setConnection(DBusConnection *dbc)
TQCString filter ;
filter + = " destination=' " ;
filter + = service ;
filter + = " \ '" ;
filter + = " '" ;
dbus_bus_add_match ( connection , filter . data ( ) , & error ) ;
if ( handleError ( ) ) {