diff options
author | Juha Vuolle <juha.vuolle@qt.io> | 2024-02-12 16:48:20 +0200 |
---|---|---|
committer | Juha Vuolle <juha.vuolle@qt.io> | 2024-02-14 17:57:02 +0200 |
commit | 2514d2cc1bf64bc1ec22936ad8af19ec22de5fc5 (patch) | |
tree | 4963a66279900969cc5e1b8e70b75901b7e2cc5f /src/network/access/qnetworkaccessmanager.h | |
parent | 6c213653d0841f00781e497a0cf724a145e75a0c (diff) |
Inline old QNetworkAccessManager transferTimeout int overloads
Qt 6.7 introduced new std::chrono variants of the transfer
timeout functions. We can now inline the old 'int milliseconds'
functions to reduce the number of DLL entry points when one
isn't needed.
Task-number: QTBUG-122023
Change-Id: I18e0ed424fa4da1dde67c811e0f3744edf24b5f8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/access/qnetworkaccessmanager.h')
-rw-r--r-- | src/network/access/qnetworkaccessmanager.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h index 6aa05b5cc8..85f4bc21d3 100644 --- a/src/network/access/qnetworkaccessmanager.h +++ b/src/network/access/qnetworkaccessmanager.h @@ -111,7 +111,9 @@ public: bool autoDeleteReplies() const; void setAutoDeleteReplies(bool autoDelete); + QT_NETWORK_INLINE_SINCE(6, 8) int transferTimeout() const; + QT_NETWORK_INLINE_SINCE(6, 8) void setTransferTimeout(int timeout); std::chrono::milliseconds transferTimeoutAsDuration() const; @@ -153,6 +155,18 @@ private: #endif }; +#if QT_NETWORK_INLINE_IMPL_SINCE(6, 8) +int QNetworkAccessManager::transferTimeout() const +{ + return int(transferTimeoutAsDuration().count()); +} + +void QNetworkAccessManager::setTransferTimeout(int timeout) +{ + setTransferTimeout(std::chrono::milliseconds(timeout)); +} +#endif // INLINE_SINCE 6.8 + QT_END_NAMESPACE #endif |