Active Topics

 


Reply
Thread Tools
Posts: 249 | Thanked: 277 times | Joined on May 2010 @ Brighton, UK
#1
I'm trying to display the Maemo 5 accounts UI using DBus (via Qt's QDbus). This works fine using dbus-send on the command line.

However, when I call it from code, the first call I get back a fail of sorts (I get an empty error message and the proxy isn't valid)...

...during which, the rtcom-accounts-ui service process is fired up by DBus.

The next call succeeds fine. Once the dialog is closed however, after a minute or so, the process exits. This would all be fine, but when I invoke the DBus call again, the process doesn't get fired up again, probably due to Dbus seemingly thinking it should still be running, as I instead get the error:
Code:
"Could not get owner of name 'com.nokia.AccountsUI': no such name"
Am I missing something that is preventing DBus from invoking the service again? The inability to automatically fire it up again seems to persist for the lifetime of my process. If I start the process manually from another terminal, then the DBus calls succeeds fine (but the process still exists afterwards).
 
Posts: 249 | Thanked: 277 times | Joined on May 2010 @ Brighton, UK
#2
Thanks to the awesome Alberto Mardegan from the maemo-devlopers list, I have an elegant workaround:
PHP Code:
QDBusMessage msg(QDBusMessage::createMethodCall(NOKIA_SERVICE_ACCOUNTS_UINOKIA_PATH_ACCOUNTS_UINOKIA_IFACE_ACCOUNTS_UI"OpenAccountsList"));
msg << (uint)winId();
QDBusConnection::sessionBus().call(msg); 
...I suspect there's a nasty bug somewhere inside the QDbusInterface object somewhere...
 

The Following User Says Thank You to mr_jrt For This Useful Post:
Reply

Tags
dbus qt qdbus


 
Forum Jump


All times are GMT. The time now is 08:21.