Porting notice: kDebug and qDebug need to go to qCDebug.

Mark markg85 at gmail.com
Wed Oct 16 13:08:53 UTC 2013


On Wed, Oct 16, 2013 at 2:39 PM, David Faure <faure at kde.org> wrote:
> On Tuesday 15 October 2013 21:58:51 Mark wrote:
>> Also, by default when porting to a qCDebug line with a category you
>> won't see log output because custom categories have everything
>> disabled by default.
>
> This has just been fixed in Qt, though.
>
>     https://codereview.qt-project.org/66744

Oh interesting!
Does that also mean that the porting notes should change from:
qCDebug(CAT) << "some debug line";

to
// qCDebug(CAT) << "some debug line";

(so commented) since now the default behavior is the same as qDebug()
only with the category prefixed.

Or (the other option) should people now by default add a line to
disable the category logging thus adding this line:
QLoggingCategory::setFilterRules(QStringLiteral("category.debug = false"));


More information about the Kde-frameworks-devel mailing list