Skip to content

Commit

Permalink
Pass QNetworkRequest::Priority by value
Browse files Browse the repository at this point in the history
It is a small and trivially copyable type.

Found by an Axivion scan.

Task-number: QTBUG-125026
Pick-to: 6.8 6.7 6.5
Change-Id: I7990d07a7062472108ab3fff8a135f1917c4f7c7
Reviewed-by: Marc Mutz <[email protected]>
Reviewed-by: Mårten Nordheim <[email protected]>
  • Loading branch information
Mate Barany committed Jul 18, 2024
1 parent bba0150 commit 8448292
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/network/access/qnetworkreplyhttpimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ bool QNetworkReplyHttpImplPrivate::loadFromCacheIfAllowed(QHttpNetworkRequest &h
return sendCacheContents(metaData);
}

QHttpNetworkRequest::Priority QNetworkReplyHttpImplPrivate::convert(const QNetworkRequest::Priority& prio)
QHttpNetworkRequest::Priority QNetworkReplyHttpImplPrivate::convert(QNetworkRequest::Priority prio)
{
switch (prio) {
case QNetworkRequest::LowPriority:
Expand Down
2 changes: 1 addition & 1 deletion src/network/access/qnetworkreplyhttpimpl_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class QNetworkReplyHttpImplPrivate: public QNetworkReplyPrivate
{
public:

static QHttpNetworkRequest::Priority convert(const QNetworkRequest::Priority& prio);
static QHttpNetworkRequest::Priority convert(QNetworkRequest::Priority prio);

QNetworkReplyHttpImplPrivate();
~QNetworkReplyHttpImplPrivate();
Expand Down

0 comments on commit 8448292

Please sign in to comment.