summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2012-04-17 21:20:59 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-04-19 15:41:04 (GMT)
commit1ee610f8fd1195026405a6f2da0d213c5da8816a (patch)
tree086ba20ab626f258245f4765d76d57e9ec55ad04 /src
parent1c20668c59169df011d29d9596bc72d4fdbb2aa4 (diff)
downloadQt-1ee610f8fd1195026405a6f2da0d213c5da8816a.zip
Qt-1ee610f8fd1195026405a6f2da0d213c5da8816a.tar.gz
Qt-1ee610f8fd1195026405a6f2da0d213c5da8816a.tar.bz2
Fix build with QT_NO_WARNING_OUTPUT
When defining QT_NO_WARNING_OUTPUT then qWarning() is not available so it should be defined in the same manner as qDebug() in this context which is as QNoDebug. The cases in QtNetwork are changed to use qWarning("....") to avoid having to add in an extra include of QDebug just so that qWarning() is declared in the QT_NO_WARNING_OUTPUT case. Task-number: QTBUG-25308 Change-Id: I4960d8943e805697d4c05cc6988306e5c25fc2bb Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.h4
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp4
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp2
3 files changed, 7 insertions, 3 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index ef6d46b..15b6afb 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1771,6 +1771,10 @@ Q_CORE_EXPORT_INLINE QDebug qCritical();
inline QNoDebug qDebug();
#endif
+#ifdef QT_NO_WARNING_OUTPUT
+inline QNoDebug qWarning();
+#endif
+
#define QT_NO_QDEBUG_MACRO while (false) qDebug
#ifdef QT_NO_DEBUG_OUTPUT
# define qDebug QT_NO_QDEBUG_MACRO
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp
index 2340a94..698ca2d 100644
--- a/src/network/access/qhttpthreaddelegate.cpp
+++ b/src/network/access/qhttpthreaddelegate.cpp
@@ -364,7 +364,7 @@ void QHttpThreadDelegate::readyReadSlot()
void QHttpThreadDelegate::finishedSlot()
{
if (!httpReply) {
- qWarning() << "QHttpThreadDelegate::finishedSlot: HTTP reply had already been deleted, internal problem. Please report.";
+ qWarning("QHttpThreadDelegate::finishedSlot: HTTP reply had already been deleted, internal problem. Please report.");
return;
}
#ifdef QHTTPTHREADDELEGATE_DEBUG
@@ -420,7 +420,7 @@ void QHttpThreadDelegate::synchronousFinishedSlot()
void QHttpThreadDelegate::finishedWithErrorSlot(QNetworkReply::NetworkError errorCode, const QString &detail)
{
if (!httpReply) {
- qWarning() << "QHttpThreadDelegate::finishedWithErrorSlot: HTTP reply had already been deleted, internal problem. Please report.";
+ qWarning("QHttpThreadDelegate::finishedWithErrorSlot: HTTP reply had already been deleted, internal problem. Please report.");
return;
}
#ifdef QHTTPTHREADDELEGATE_DEBUG
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 33a5622..32225aa 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -801,7 +801,7 @@ void QNetworkReplyImplPrivate::error(QNetworkReplyImpl::NetworkError code, const
Q_Q(QNetworkReplyImpl);
// Can't set and emit multiple errors.
if (errorCode != QNetworkReply::NoError) {
- qWarning() << "QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.";
+ qWarning("QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.");
return;
}