summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2011-12-22 13:46:15 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-05 15:02:56 +0100
commit9498f1aa54fefb3d1c78f5e38880607147512567 (patch)
tree519ce3c75c674de937d1139b55877e7923b1fb3d /src/corelib/global/qglobal.h
parentec104d7a5480b334cbbdc41d1536670585da6bba (diff)
Fix compile error with qWarning() << myDateTime and QT_NO_DEBUG_OUTPUT
All QDebug operator << in custom classes were disabled by QT_NO_DEBUG_STREAM, which was set by QT_NO_DEBUG_OUTPUT. Now QT_NO_DEBUG_STREAM is never set automatically, but remains available for reducing the feature set altogether (qconfig.h). Remove check on QT_NO_TEXTSTREAM: this define is meaningless, it doesn't even undefine QTextStream, and this is unrelated to QDebug streaming anyway. Change-Id: I5eeed0144fa684d0e790e9dfd9a4aeb956218c39 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r--src/corelib/global/qglobal.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index f1ce80e1ea..bb6fa61941 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1683,10 +1683,6 @@ Q_CORE_EXPORT void qFatal(const char *, ...) /* print fatal message and exit */
Q_CORE_EXPORT void qErrnoWarning(int code, const char *msg, ...);
Q_CORE_EXPORT void qErrnoWarning(const char *msg, ...);
-#if (defined(QT_NO_DEBUG_OUTPUT) || defined(QT_NO_TEXTSTREAM)) && !defined(QT_NO_DEBUG_STREAM)
-#define QT_NO_DEBUG_STREAM
-#endif
-
/*
Forward declarations only.
@@ -1694,13 +1690,19 @@ Q_CORE_EXPORT void qErrnoWarning(const char *msg, ...);
*/
class QDebug;
class QNoDebug;
-#ifndef QT_NO_DEBUG_STREAM
+#if !defined(QT_NO_DEBUG_OUTPUT) && !defined(QT_NO_DEBUG_STREAM)
Q_CORE_EXPORT_INLINE QDebug qDebug();
-Q_CORE_EXPORT_INLINE QDebug qWarning();
-Q_CORE_EXPORT_INLINE QDebug qCritical();
#else
inline QNoDebug qDebug();
#endif
+#if !defined(QT_NO_WARNING_OUTPUT) && !defined(QT_NO_DEBUG_STREAM)
+Q_CORE_EXPORT_INLINE QDebug qWarning();
+#else
+inline QNoDebug qWarning();
+#endif
+#if !defined(QT_NO_DEBUG_STREAM)
+Q_CORE_EXPORT_INLINE QDebug qCritical();
+#endif
#define QT_NO_QDEBUG_MACRO while (false) qDebug
#ifdef QT_NO_DEBUG_OUTPUT