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