[PATCH] KIO::SlaveBase and the event loop
thiago at kde.org
Tue Jul 15 16:44:58 BST 2008
Sebastian Trüg wrote:
>I create a local event loop in the listDir method and execute it after
>starting my thread that does all the dbus communication. DBus signals
> come in via a queued connection and are handled in the main thread
> (they create listEntry calls). Once the initial listing is done
> (search) I disconnect the dbus signals and reconnect them directly.
> That is because once my local event loop is done I still need to get
> the dbus signals to update my internal state and emit KDirNotify
>It works but with a rather bis delay for the update signals that are to
> be delivered directly. I don't really understand that since my thread
> runs its own event loop.
>I hope this was not too confusing. ;)
If you're going to use a separate thread for handling a D-Bus connection,
do not use QDBusConnection::sessionBus() nor
QDBusConnection::systemBus(). You must connect on your own.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel