[Kde-hardware-devel] PowerManager Library
Daniel Nicoletti
dantti12 at gmail.com
Thu Jun 21 00:06:51 UTC 2012
> Networkmanagement's kded module uses KDialog to get the PIN/PUK codes to
> unlock Gsm modems, which means it also need to be in the main thread, at
> least that part have to be. Most of the kded initialization is done after
> the plasmoid is loaded (there is a signal for that), although I did not
> implement that for loading the module faster it also helps in this regard.
> My main concern is if something tries to access the module before it is
> fully up and running, hmmm if registering it to the bus is the last step
> that should do the trick (famous last words, part 2 :-)).
Right, that's what I did for Apper first so it doesn't delay the fork()
(which is what kde start scripts are waiting for), then I realized it would
be nicer to be in a separate thread.
For the KDialog thing I'd send a notification, and then have a dbus-activatable
dialog (what I would do, but dunno if it makes sense for these codes).
About accessing the interface, I'd actually put it when as soon as
the thread is created, and well if you are worried about something
trying to access it, you might already have problems if kded dies
which you should be able to recover... but well if the connections are
complex it will need testing to make sure everything can start working
even if the service get's registered later..
More information about the Kde-hardware-devel
mailing list