From 58e1465cb0042899063124ded827f52dd92b8b42 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Mon, 26 Sep 2016 23:38:37 +0200 Subject: Add configurable connect timeout for QAbstractSocket The aim of this patch is to allow the configuration of the connect timeout used by QAbstractSocket that is currently hardcoded to 30 seconds. Using QNetworkConfiguration for this allows to adapt the timeout per network configuration (e.g. 2G vs wired lan) [ChangeLog][QtNetwork] The connect timeout from QAbstractSocket is now configurable through QNetworkConfiguration. Change-Id: I1dc4051be2c74f925f7a9e0a9ccef332efc2e370 Reviewed-by: Lorn Potter --- src/network/bearer/qnetworkconfiguration.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/network/bearer/qnetworkconfiguration.h') diff --git a/src/network/bearer/qnetworkconfiguration.h b/src/network/bearer/qnetworkconfiguration.h index 208f9f4692..e7b74034fc 100644 --- a/src/network/bearer/qnetworkconfiguration.h +++ b/src/network/bearer/qnetworkconfiguration.h @@ -120,6 +120,9 @@ public: QString name() const; bool isValid() const; + int connectTimeout() const; + bool setConnectTimeout(int timeout); + private: friend class QNetworkConfigurationPrivate; friend class QNetworkConfigurationManager; -- cgit v1.2.3