D5693: First attempt to port remaining dbo* statements to qCDebug().

Luigi Toscano luigi.toscano at tiscali.it
Wed May 3 20:03:43 UTC 2017


Ian Wadham ha scritto:
> Hi Luigi,
> 
> Hope you don't get two copies of this.
> 
> I don't have an email address for Johan Ouwerkerk and I don't have
> access to Phabricator, as I have retired from KDE now.  I tried writing
> to the KDE Games list before about issues regarding KSudoku, but
> nobody seemed to notice.  Do you guys still read KDE Games?

I added Johan, and as Albert pointed you only need your identity account to
access Phabricator (even if retired, a comment is still useful). Yes, I do
read this list. Sorry for the lack of feedback, but we have been mostly
coordinating on the fly on IRC when someone was available to send the patch.
But all the notes sent to the list.

> 
> Re the current issue, it might be unwise to replace all occurrences of
> "dboN" with calls to qCDebug(), unless the "KSudokuLog" parameter
> exactly reproduces the behaviour of debug levels and macros defined
> in file "generator/debug.h".  If log messages appear as "all or none",
> you will either be flooded with (possibly millions of) messages from
> the KSudoku solver or receive no messages at all.  Neither of those
> alternatives would be any use if a bug appeared in the main solver ---
> and the "debugging on" alternative would be a serious drag on resources,
> because that solver is invoked multiple times when generating a puzzle.
> 
> Also, if Johan goes ahead, lines like the following would need attention:
>     if (dbgLevel >= 2) {
>         this->print (boardValues);
>     }
> 
> It might be easiest just to redefine the "debug.h" file in terms of qCDebug().

> Similar remarks apply in games where I used the "debug.h" approach to
> debug details of animation frames (Kubrick? KGoldrunner?).

I disagree that using different systems for logging at the same time
(printf/fprintf/qDebug) only adds more complexity. On the other side, it is
possible to select different levels by defining different logging categories,
and this is something that we should consider for the logs of the solver. I
rechecked also the logging messages ported from kDebug/qDebug/dbe (sometimes
the same log was sent through qDebug and dbe) and I think that other levels
are not required there, but that's open for discussion.

-- 
Luigi


More information about the kde-games-devel mailing list