Yes in that sense it does slot in.
I was looking for a way to use the existing macro - redefine RG_DEBUG to
something using qCDebug - this appears to be not so easy.
I think the category logging is a separate issue to the precompiled
headers - I think we have reached a good status with the precompilation.
So I have changed the subject for this discussion.
I still think qCDebug is a good way to go. I just don't know how to do
it without changing many hundreds of lines of code in almost all files.
Any suggestions ?
On 4/18/21 9:34 PM, David Faure wrote:
On dimanche 18 avril 2021 15:29:30 CEST Philip Leishman wrote:
Unfortunately the qCDebug calls do not seem to slot seamlessly into the
code as it is. But worth looking into.
What makes you say that?
Currently, Composition.cpp says:
#define RG_MODULE_STRING "[Composition]"
[...]
//#define DEBUG_BAR_STUFF 1
[...]
#ifdef DEBUG_BAR_STUFF
RG_DEBUG << "calculateBarPositions()";
#endif
What I suggest is that it would say instead
#include <QLoggingCategory>
Q_LOGGING_CATEGORY(DEBUG_COMPOSITION, "net.sf.rosegarden.composition",
QtInfoMsg)
[...]
qCDebug(DEBUG_COMPOSITION) << "calculateBarPositions()";
qCDebug(DEBUG_COMPOSITION) "slots in" to replace RG_DEBUG everywhere in this
file.
Note how the QtInfoMsg argument for the category means that
this debug output is off by default, just like before (because of the ifdef).
But I suggest that even debug output that was on by default, would become
off by default, since it becomes really easy to turn on what one needs.
On 4/17/21 7:44 PM, Ted Felix wrote:
It does. However gcc's pre-compiled header feature appears to start
losing its effectiveness at around 10 headers or so. We're at that
limit already and any tweaking of RG_DEBUG to allow the incorporation
of more headers is not going to help things.
I don't understand. Do you have more details about the 10 headers thing?
And what's the tweaking of RG_DEBUG? My proposal or something else?
My proposal does not include more headers, in fact less.
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel