Sha256: 03329d46a880df42afce95e63111d6e79cf72aab4e64f36a146b111f395ee23d
Contents?: true
Size: 999 Bytes
Versions: 24
Compression:
Stored size: 999 Bytes
Contents
#include "IgnoreDebugOutput.h" #include <QtGlobal> #include <QString> #include <stdio.h> void debugIgnoringMessageHandler(QtMsgType type, const char *msg); #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) void debugIgnoringMessageHandlerQt5(QtMsgType type, const QMessageLogContext &context, const QString &message); #endif void debugIgnoringMessageHandler(QtMsgType type, const char *msg) { switch (type) { case QtDebugMsg: case QtWarningMsg: break; default: fprintf(stderr, "%s\n", msg); break; } } #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) void debugIgnoringMessageHandlerQt5(QtMsgType type, const QMessageLogContext &context, const QString &message) { Q_UNUSED(context); debugIgnoringMessageHandler(type, message.toLocal8Bit().data()); } #endif void ignoreDebugOutput(void) { #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) qInstallMessageHandler(debugIgnoringMessageHandlerQt5); #else qInstallMsgHandler(debugIgnoringMessageHandler); #endif }
Version data entries
24 entries across 24 versions & 2 rubygems