kDebug and the Application object
Michael Jansen
kde at michael-jansen.biz
Sun Apr 13 19:14:43 BST 2008
On Sunday 13 April 2008 19:58:58 Thiago Macieira wrote:
> Michael Jansen wrote:
> >Remember there are kError and kWarning too. Both have the same problem.
> > And i would expect to get a application name when seeing an error
> > message. <unknown program name> is definetely not correct there.
>
> We can change it to "unknown main component", which is technically more
> correct.
>
> It is definitely not an error to use those routines before the name is
> known.
>
> >Back to printf seems to be wrong for me. Is it safe to set the
> > mainComponent before creating the application object?
>
> I don't know.
>
> But solve your problem by moving all your code to *after* the
> KUniqueApplication initialisation. Do everything after the application
> has forked.
I will try. Looks like i have to change the code anyhow (all those problems
pop up during my work on khotkeys).
But it did cost me much headache finding out why the code didn't work as
expected. That's why i think a small note would be nice in the documentation.
If you don't complain i will add such a note to the kDebug/kError/kWarning
apidoc
"If you get <unknown program name> you use these functions before initializing
the application / mainComponent" or whatever i come up with when having more
time.
Mike
--
Michael Jansen
Available for contract work ( Development / Configuration Management )
http://www.michael-jansen.biz
More information about the kde-core-devel
mailing list