[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: QDBus connection problem
From: Thiago Macieira <thiago () kde ! org>
Date: 2010-04-29 20:22:59
Message-ID: 201004292223.00344.thiago () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
Em Quinta-feira 29. Abril 2010, ās 16.28.35, Duns Ens escreveu:
> I would like to get some clarification on a DBus connection problem I have.
> I am trying to wrap a kio slave around ktorrents dbus interface to allow
> easy usage of torrent shares in all of KDE.
>
> Now my problem is that I need to have a QObject to connect to the dbus
> signals. I have inherited my slave from both QObject and SlaveBase but
> although the dbus calls go out to ktorrent and internal signal slot
> communication works the dbus signal connection from KTorrent does not
> work. dbus-monitor shows that the message is emitted on the specified
> interface.
>
> Maybe I am doing sth. wrong with inheriting QObject for a kio slave? Or do
> I need a QApplication with app.exec() in the main function to start some
> event loop?
You need an event loop to receive D-Bus signals.
IOSlaves have no event loop.
You need to start a thread and receive the signal there. Be careful with
cross-thread synchronisation issues. Also be sure of creating the D-Bus
connection in the thread.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
["signature.asc" (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic