Thanks a lot, you let me know what an expert look like. B.R. He Yunlong
-----Original Message----- From: Thiago Macieira [mailto:[email protected]] Sent: Monday, December 27, 2010 9:49 PM To: [email protected] Cc: He, Yunlong Subject: Re: [MeeGo-dev] QDBusConnection::ExportAllSlots not supported? On Monday, 27 de December de 2010 16:58:57 He, Yunlong wrote: > Hi, Experts, Hello > I am new to QtDBus, so tried simple way to use > QDBusConnection::ExportAllSlots: > > MyDaemon mydaemon; > QDBusConnection::sessionBus().registerObject("/", &mydaemon, > QDBusConnection::ExportAllSlots); That's it :-) > Then in client side > > QDBusInterface iface(MSIP_CHANNEL_NAME, "/", "", > QDBusConnection::sessionBus()); > QDBusReply<QString> reply = > iface.call("add", 2, 3); > > > Finally it reports: > Didn't receive a reply. Possibly causes include: the remote > application did > not send a reply .... > > > After checking log, the method is never called: > int MyDaemon::add(int a, int b) > { > syslog(LOG_INFO, "handling add\n"); > return a + b; > } > > So I wonder whether ExportAllSlots is supported, or is there > anything wrong in my code. There must be something wrong in your code, in parts of the code that you didn't paste here. It's either because: 1) the server application did not enter an event loop, so it's not processing any incoming messages 2) the client application failed to connect (usually due to wrong UID) so it gets a spurious Timeout error You can tell which case it is by timing how long it takes you to get the error. If you get a Timeout error immediately, then it's case 2. If it waits for 25 seconds, then it's case 1. PS: please don't hijack threads. Your message has nothing to do with the Pulseaudio reversion plan. If you have a new topic, please create a new message, don't reply to any existing one. Changing the Subject isn't enough. -- 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 _______________________________________________ MeeGo-dev mailing list [email protected] http://lists.meego.com/listinfo/meego-dev
