From 3c80e8892459f47a6261df317eb6eb4d9c790837 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 1 Nov 2023 16:05:54 +0300 Subject: [PATCH] qnetworkcookie: remove parseCookies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit that takes QBA in favor of QBAV version Change-Id: I56bbe5cc5c7fa3e31e6b6e71d97211de3eb1ab26 Reviewed-by: MÃ¥rten Nordheim --- src/network/access/qnetworkcookie.cpp | 10 +--------- src/network/access/qnetworkcookie.h | 2 ++ src/network/compat/removed_api.cpp | 7 +++++++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index 483860f96a..8ea5fdbe57 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -932,15 +932,7 @@ static QDateTime parseDateString(QByteArrayView dateString) cookie that is parsed. \sa toRawForm() -*/ -QList QNetworkCookie::parseCookies(const QByteArray &cookieString) -{ - return parseCookies(QByteArrayView(cookieString)); -} - -/*! - \overload - \since 6.7 + \note In Qt versions prior to 6.7, this function took QByteArray only. */ QList QNetworkCookie::parseCookies(QByteArrayView cookieString) { diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h index c5642f7bd7..aed9c8af12 100644 --- a/src/network/access/qnetworkcookie.h +++ b/src/network/access/qnetworkcookie.h @@ -75,7 +75,9 @@ public: bool hasSameIdentifier(const QNetworkCookie &other) const; void normalize(const QUrl &url); +#if QT_NETWORK_REMOVED_SINCE(6, 7) static QList parseCookies(const QByteArray &cookieString); +#endif static QList parseCookies(QByteArrayView cookieString); private: diff --git a/src/network/compat/removed_api.cpp b/src/network/compat/removed_api.cpp index f445556c19..969ad9cd3b 100644 --- a/src/network/compat/removed_api.cpp +++ b/src/network/compat/removed_api.cpp @@ -33,6 +33,13 @@ bool QNetworkRequest::hasRawHeader(const QByteArray &headerName) const return hasRawHeader(qToByteArrayViewIgnoringNull(headerName)); } +#include "qnetworkcookie.h" + +QList QNetworkCookie::parseCookies(const QByteArray &cookieString) +{ + return parseCookies(qToByteArrayViewIgnoringNull(cookieString)); +} + // #include "qotherheader.h" // // implement removed functions from qotherheader.h // order sections alphabetically