On samedi 17 avril 2021 16:24:02 CEST Ted Felix wrote:
> On 4/17/21 3:56 AM, Philip Leishman wrote:
> > In the comments Ted mentions the problem with RG_MODULE_STRING. This
> > seems to be an ordering problem.
> 
>    Ah!  I knew it was something like that.  I just didn't have time to
> dig into it.  Good find there.
> 
> > 2. remove the generic definition in Debug.h
> 
>    I think this is a great idea since it will indeed force us to get
> this right everywhere immediately instead of stumbling on it later as we
> do now.
> 
> > Also the debug
> > macros should then not be used in header files - Event.h does this
> 
>    That's always going to be a problem.  Depending on the situation,
> either move to .cpp or remove the RG_DEBUG (especially for things that
> we actual want to compile as inline).

Instead of the RG_DEBUG macro "hack", I recommend using qCDebug() to make it 
possible to enable/disable debug output by category.

Each value of RG_MODULE_STRING would become a different logging category.

See https://doc.qt.io/qt-5/qloggingcategory.html#details for the documentation
of the feature, if you don't know it.

Developers could enable/disable categories with an env var, a C++ call, a 
config file, or even the KDE-provided kdebugsettings if rosegarden installs 
the right description file.

Porting to that sounds like a job for some perl scripting, which I volunteer 
to do if you guys agree.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5





_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to