summaryrefslogtreecommitdiffstats
path: root/src/network/bearer/qnetworkconfiguration_p.h
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2016-09-26 23:38:37 +0200
committerSamuel Gaist <samuel.gaist@edeltech.ch>2016-11-29 14:01:47 +0000
commit58e1465cb0042899063124ded827f52dd92b8b42 (patch)
tree80ffb624019628b9d3108d6f2edbbd9473d191f6 /src/network/bearer/qnetworkconfiguration_p.h
parenta0551ae6100a12a0590ef7352b5ea027a442c0d7 (diff)
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 <lorn.potter@canonical.com>
Diffstat (limited to 'src/network/bearer/qnetworkconfiguration_p.h')
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
index 12d9676b59..2fdb490ea0 100644
--- a/src/network/bearer/qnetworkconfiguration_p.h
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -69,7 +69,8 @@ public:
type(QNetworkConfiguration::Invalid),
purpose(QNetworkConfiguration::UnknownPurpose),
bearerType(QNetworkConfiguration::BearerUnknown),
- isValid(false), roamingSupported(false)
+ isValid(false), roamingSupported(false),
+ timeout(DefaultTimeout)
{}
virtual ~QNetworkConfigurationPrivate()
{
@@ -91,6 +92,9 @@ public:
bool isValid;
bool roamingSupported;
+ int timeout;
+
+ static Q_CONSTEXPR int DefaultTimeout = 30000;
private:
Q_DISABLE_COPY(QNetworkConfigurationPrivate)