[PATCH] MarbleDebug: don't use a class extending QIODevice as a null device
Thiago Macieira
thiago at macieira.org
Mon Apr 17 12:29:00 PDT 2017
On segunda-feira, 17 de abril de 2017 12:01:48 PDT Lubomir I. Ivanov wrote:
> QDebug mDebug()
> {
> return QDebug( QtDebugMsg ); // or "return qDebug();"
> }
>
> which will essentially enable debug output for everything in Marble,
> until we write a dummy Class with an overloaded << operator to void
> all the incoming debug calls.
It would be better to use a category and then simply turn the category off. It
can be enabled manually by users with QT_LOGGING_RULES environment variable.
See http://doc.qt.io/qt-5/qloggingcategory.html.
This functionality didn't exist in Qt 4, which is why Marble rolled out its
own.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
More information about the subsurface
mailing list