From 1aee8f71da584525eea569690110ca2ed471c5ae Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 23 Jun 2010 07:44:10 +0200 Subject: Ensure that compiling with the no debug/warning output defines works The defines that can be used are QT_NO_DEBUG_OUTPUT and QT_NO_WARNING_OUTPUT in order to turn off qDebug and qWarning output. Reviewed-by: cduclos Reviewed-by: Markus Goetz --- src/gui/accessible/qaccessible_mac_cocoa.mm | 4 ++++ src/network/access/qftp.cpp | 2 +- src/opengl/qgl_p.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/accessible/qaccessible_mac_cocoa.mm b/src/gui/accessible/qaccessible_mac_cocoa.mm index 1688404..ada927e 100644 --- a/src/gui/accessible/qaccessible_mac_cocoa.mm +++ b/src/gui/accessible/qaccessible_mac_cocoa.mm @@ -58,11 +58,15 @@ QT_BEGIN_NAMESPACE //#define MAC_ACCESSIBILTY_DEVELOPER_MODE +#ifndef QT_NO_DEBUG_STREAM #ifdef MAC_ACCESSIBILTY_DEVELOPER_MODE #define MAC_ACCESSIBILTY_DEBUG QT_PREPEND_NAMESPACE(qDebug) #else #define MAC_ACCESSIBILTY_DEBUG if (0) QT_PREPEND_NAMESPACE(qDebug) #endif +#else +#define MAC_ACCESSIBILTY_DEBUG if (0) QT_PREPEND_NAMESPACE(QNoDebug) +#endif typedef QMap QMacAccessibiltyRoleMap; Q_GLOBAL_STATIC(QMacAccessibiltyRoleMap, qMacAccessibiltyRoleMap); diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp index 7f6df0a..97219f4 100644 --- a/src/network/access/qftp.cpp +++ b/src/network/access/qftp.cpp @@ -2311,7 +2311,7 @@ void QFtpPrivate::_q_piError(int errorCode, const QString &text) Q_Q(QFtp); if (pending.isEmpty()) { - qWarning() << "QFtpPrivate::_q_piError was called without pending command!"; + qWarning("QFtpPrivate::_q_piError was called without pending command!"); return; } diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 191131e..4facb65 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -114,7 +114,7 @@ QT_BEGIN_INCLUDE_NAMESPACE QT_END_INCLUDE_NAMESPACE # ifdef old_qDebug # undef qDebug -# define qDebug QT_QDEBUG_MACRO +# define qDebug QT_NO_QDEBUG_MACRO # undef old_qDebug # endif class QMacWindowChangeEvent; -- cgit v0.12