Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.4
-
None
Description
I have declared a category for QMessageLogger:
Q_DECLARE_LOGGING_CATEGORY(network)
To print messages like this one:
qDebug(network) << "UDP port" << port << "ready.";
If I switch to Release mode which defines QT_NO_DEBUG_OUTPUT so disables qDebug all qDebug() messages disappears but code will not compile in lines where category is used:
error: no matching function for call to 'QMessageLogger::noDebug(const QLoggingCategory& (&)())' qDebug(network) << UDP port" << port << "ready.";
I think additional function should be declared in qlogging.h.
Now:
QNoDebug noDebug() const Q_DECL_NOTHROW;
Add to correct the problem (I did not checked it it is working):
QNoDebug noDebug() const Q_DECL_NOTHROW; QNoDebug noDebug(const QLoggingCategory &cat) const Q_DECL_NOTHROW; (...)