Correct use of "QT_NO_DEBUG_OUTPUT" and "QT_NO_WARNING_OUTPUT"

1.6
Ivan De Marino 2012-03-22 18:10:39 +00:00 committed by Ariya Hidayat
parent 8db267bb56
commit 775c2ad2af
2 changed files with 1 additions and 3 deletions

View File

@ -4,7 +4,7 @@ QT += network webkit
CONFIG += console
# Comment to enable Debug Messages
DEFINES += QT_NO_DEBUG_OUTPUT
DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
DESTDIR = ../bin

View File

@ -52,14 +52,12 @@ void Utils::messageHandler(QtMsgType type, const char *msg)
QDateTime now = QDateTime::currentDateTime();
switch (type) {
#ifndef QT_NO_DEBUG
case QtDebugMsg:
fprintf(stdout, "%s [DEBUG] %s\n", qPrintable(now.toString(Qt::ISODate)), msg);
break;
case QtWarningMsg:
fprintf(stderr, "%s [WARNING] %s\n", qPrintable(now.toString(Qt::ISODate)), msg);
break;
#endif
case QtCriticalMsg:
fprintf(stderr, "%s [CRITICAL] %s\n", qPrintable(now.toString(Qt::ISODate)), msg);
break;