QHttpHeaderParser: add rvalue-this overload to headers()
Add rvalue-this overload to be called by corresponding QHttpServerRequest::headers() method. Task-number: QTBUG-125859 Change-Id: I2b12d2b80614f627c1aca514a10e1e86a2c5b24d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 5e9212c1069604dd88fef9f0877459abeb87ad27) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
1c633d68b4
commit
b694c58d5e
@ -128,11 +128,16 @@ bool QHttpHeaderParser::parseStatus(QByteArrayView status)
|
||||
return ok && uint(majorVersion) <= 9 && uint(minorVersion) <= 9;
|
||||
}
|
||||
|
||||
const QHttpHeaders& QHttpHeaderParser::headers() const
|
||||
const QHttpHeaders& QHttpHeaderParser::headers() const &
|
||||
{
|
||||
return fields;
|
||||
}
|
||||
|
||||
QHttpHeaders QHttpHeaderParser::headers() &&
|
||||
{
|
||||
return std::move(fields);
|
||||
}
|
||||
|
||||
QByteArray QHttpHeaderParser::firstHeaderField(QByteArrayView name,
|
||||
const QByteArray &defaultValue) const
|
||||
{
|
||||
|
@ -53,7 +53,8 @@ public:
|
||||
bool parseHeaders(QByteArrayView headers);
|
||||
bool parseStatus(QByteArrayView status);
|
||||
|
||||
const QHttpHeaders& headers() const;
|
||||
const QHttpHeaders& headers() const &;
|
||||
QHttpHeaders headers() &&;
|
||||
void setStatusCode(int code);
|
||||
int getStatusCode() const;
|
||||
int getMajorVersion() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user