Let kquitapp fail verbosely
Michael Pyne
mpyne at purinchu.net
Sun May 25 17:06:27 BST 2008
On Sunday 25 May 2008, Stefan Monov wrote:
> Hi, thanks for the comments. :)
>
> > Since KDE includes are already present I'd use kError() or kWarning()
> > (not kDebug() either way).
>
> kWarning() outputs:
> kquitapp(4511)/ main: "foo: no application quit"
> Quite ugly and debuggish. At least, the function "main" and the
> quotation marks shouldn't be there. Is kWarning() really intended for
> use with command line tools?
Well I've never used kquitapp from the command line, I wasn't aware it was
only a command line tool.
> > Also in theory people can have a notification pop up
> > for these types of events if there's not running kquitapp from the shell.
>
> But this popup would be annoying if I actually worked in the shell,
> and I don't think kquitapp is told who launched it.
Well it turns out I'm wrong either way, we'd have to assign a debug area to
kquitapp to get that capability. But I recommend you go through the
"Notifications" applet in system settings so you can see what I'm referring
to. Other possible notifications are all in addition to the output at the
shell so it would still be ok at the shell.
Based on the limited (if any) gain by going to kWarning() with no debug area I
think using std::cerr should be perfectly fine.
Regards,
- Michael Pyne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080525/ba922fc3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080525/ba922fc3/attachment.sig>
More information about the kde-core-devel
mailing list