From 7bb0d5379d74100593da4b14441a886f82c263b6 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Fri, 22 Nov 2019 13:48:15 +0200 Subject: [PATCH] Make transferTimeout getters const Change-Id: I84c7e830ed9cf58c05ff06052c3df3beb74bb723 Reviewed-by: Timur Pocheptsov --- src/network/access/qnetworkaccessmanager.cpp | 2 +- src/network/access/qnetworkaccessmanager.h | 2 +- src/network/access/qnetworkrequest.cpp | 2 +- src/network/access/qnetworkrequest.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 6c1cb420fe..ff916ff283 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -1726,7 +1726,7 @@ void QNetworkAccessManager::setAutoDeleteReplies(bool shouldAutoDelete) This timeout is zero if setTransferTimeout() hasn't been called, which means that the timeout is not used. */ -int QNetworkAccessManager::transferTimeout() +int QNetworkAccessManager::transferTimeout() const { return d_func()->transferTimeout; } diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h index 6db4094a8e..aa4765a043 100644 --- a/src/network/access/qnetworkaccessmanager.h +++ b/src/network/access/qnetworkaccessmanager.h @@ -170,7 +170,7 @@ public: bool autoDeleteReplies() const; void setAutoDeleteReplies(bool autoDelete); - int transferTimeout(); + int transferTimeout() const; void setTransferTimeout(int timeout = QNetworkRequest::TransferTimeoutPreset); Q_SIGNALS: diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index e03d844af9..92e5aed38c 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -936,7 +936,7 @@ void QNetworkRequest::setHttp2Configuration(const QHttp2Configuration &configura \sa setTransferTimeout */ -int QNetworkRequest::transferTimeout() +int QNetworkRequest::transferTimeout() const { return d->transferTimeout; } diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h index 5d9969bd9b..dcd2c6b61f 100644 --- a/src/network/access/qnetworkrequest.h +++ b/src/network/access/qnetworkrequest.h @@ -189,7 +189,7 @@ public: QHttp2Configuration http2Configuration() const; void setHttp2Configuration(const QHttp2Configuration &configuration); - int transferTimeout(); + int transferTimeout() const; void setTransferTimeout(int timeout = TransferTimeoutPreset); #endif // QT_CONFIG(http) || defined(Q_CLANG_QDOC) private: