@ -82,9 +82,9 @@ static void qDBusRemoveTimeout(DBusTimeout *timeout, void *data)
TQT_DBusConnectionPrivate * d = static_cast < TQT_DBusConnectionPrivate * > ( data ) ;
for ( TQValueList < DBusTimeout * > : : iterator it = d - > pendingTimeouts . begin ( ) ;
it ! = d - > pendingTimeouts . end ( ) ; ) {
if ( ( * it ) = = timeout ) {
it = d - > pendingTimeouts . erase ( it ) ;
}
if ( ( * it ) = = timeout ) {
it = d - > pendingTimeouts . erase ( it ) ;
}
else
+ + it ;
}
@ -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 ( ) ) {