Patch: port kError to qError and kFatal to qFatal

Jignesh Kakadiya jigneshhk1992 at gmail.com
Thu Jan 10 05:19:10 UTC 2013


Here cmd is int so I haven't made any changes. for listit I used qWarning()
followed by abort(). Please review it.


On Wed, Jan 9, 2013 at 5:16 PM, David Faure <faure at kde.org> wrote:

> On Wednesday 09 January 2013 16:45:08 Jignesh Kakadiya wrote:
> > Hi David,
> >
> > I have ported all kError calls to qWarning and kFatal to qFatal in
> > kdelibs/kio/kio directory. Compiles successfully. Please review it.
> >
> > Next patch will be removal of kdebug.h include from kio/kio.
>
> qFatal("Fatal Error: Got cmd %s, while waiting for an answer!", cmd);
>
> I doubt that cmd is a char*. If it's a QString, use qPrintable(cmd), if
> it's a
> QByteArray, use cmd.constData().
> Otherwise it compiles, but with a compiler warning (cannot pass a POD to
> "...") and it will crash at runtime (OK, for qFatal we expect a crash, but
> it
> helps if we can see the message first :-)
>
>
> +        qFatal() << "HUH? Lister" << listit << "is supposed to be listing,
> but has no job!";
>
> This one won't compile. You didn't notice because it's inside #if 0, but it
> should be fixed for whenever a developer re-enables that code. If qFatal
> is too
> cumbersome to use, you could use qWarning() followed by abort, for
> instance.
>
> --
> David Faure, faure at kde.org, http://www.davidfaure.fr
> Working on KDE, in particular KDE Frameworks 5
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130110/c51d957b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kError_and_kFatal.patch
Type: application/octet-stream
Size: 15462 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130110/c51d957b/attachment.obj>


More information about the Kde-frameworks-devel mailing list