diff options
author | Mate Barany <mate.barany@qt.io> | 2023-11-14 15:10:38 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2024-05-03 15:16:14 +0000 |
commit | 3377b74df903cdaa99b5d1c83680e13b78674a08 (patch) | |
tree | dcc37c7eb414fb9df05164c363f65505177358a4 /src/network/access/qhttpmultipart.h | |
parent | b64932ba82ebdb4d03815263570b7a9d2ea1dc92 (diff) |
Add QDebug support to QHttpPart
As part of QTBUG-114647 we are planning to introduce a deduction
mechanism that could deduce the contentType header and the
contentDisposition headers based on the arguments (and the MIME
database).
In case of non-trivial types this deduction may give the wrong result
and without QDebug support it might be a bit tedious to check.
The debug output displays some information about the body device if
one is attached, otherwise it displays the size of the body.
Task-number: QTBUG-114647
Change-Id: Ia693b078ff5b9f8ea57fbf3c385edaec47886ff1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/access/qhttpmultipart.h')
-rw-r--r-- | src/network/access/qhttpmultipart.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/access/qhttpmultipart.h b/src/network/access/qhttpmultipart.h index 26e5fafdf2..9732bbd99d 100644 --- a/src/network/access/qhttpmultipart.h +++ b/src/network/access/qhttpmultipart.h @@ -19,6 +19,7 @@ QT_BEGIN_NAMESPACE class QHttpPartPrivate; class QHttpMultiPart; +class QDebug; class Q_NETWORK_EXPORT QHttpPart { @@ -45,6 +46,9 @@ private: QSharedDataPointer<QHttpPartPrivate> d; friend class QHttpMultiPartIODevice; +#ifndef QT_NO_DEBUG_STREAM + friend Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QHttpPart &httpPart); +#endif }; Q_DECLARE_SHARED(QHttpPart) |