From kde-core-devel Sat Sep 29 11:38:39 2007 From: David Jarvie Date: Sat, 29 Sep 2007 11:38:39 +0000 To: kde-core-devel Subject: Re: Are D-Bus signals received by the emitting app? Message-Id: <200709291238.39710.lists () astrojar ! org ! uk> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=119106594320649 On Saturday 29 September 2007 12:18:13 Thiago Macieira wrote: > David Jarvie wrote: > >I'm attempting to write a unit test for some changes to the > > KSystemTimeZones class, but when the unit test emits a D-Bus signal, it > > is not picked up by the KSystemTimeZones instance which is instanciated > > within the unit test. When the same signal is emitted by ktimezoned, it > > is picked up by KSystemTimeZones in a different app. Can a D-Bus signal > > be received by the same app which emitted it? If not, is there any way > > round this so that the unit test instance can be made to think it's > > receiving the signal? > > They are received if there's something listening for it. > > Signal reception requires the event loop. How can an event loop be implemented in a unit test based on QTEST_KDEMAIN_CORE? -- David Jarvie. KAlarm author and maintainer. http://www.astrojar.org.uk/kalarm