summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkaccesscache.cpp12
-rw-r--r--src/network/access/qnetworkaccesscache_p.h4
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp13
3 files changed, 13 insertions, 16 deletions
diff --git a/src/network/access/qnetworkaccesscache.cpp b/src/network/access/qnetworkaccesscache.cpp
index 6ff70cd546d..1f2bbd321cf 100644
--- a/src/network/access/qnetworkaccesscache.cpp
+++ b/src/network/access/qnetworkaccesscache.cpp
@@ -176,18 +176,6 @@ void QNetworkAccessCache::updateTimer()
timer.start(interval + 10, this);
}
-bool QNetworkAccessCache::emitEntryReady(Node *node, QObject *target, const char *member)
-{
- if (!connect(this, SIGNAL(entryReady(QNetworkAccessCache::CacheableObject*)),
- target, member, Qt::QueuedConnection))
- return false;
-
- emit entryReady(node->object);
- disconnect(SIGNAL(entryReady(QNetworkAccessCache::CacheableObject*)));
-
- return true;
-}
-
void QNetworkAccessCache::timerEvent(QTimerEvent *)
{
while (firstExpiringNode && firstExpiringNode->timer.hasExpired()) {
diff --git a/src/network/access/qnetworkaccesscache_p.h b/src/network/access/qnetworkaccesscache_p.h
index 4d4ff325f98..5d7dc819461 100644
--- a/src/network/access/qnetworkaccesscache_p.h
+++ b/src/network/access/qnetworkaccesscache_p.h
@@ -69,9 +69,6 @@ public:
void releaseEntry(const QByteArray &key);
void removeEntry(const QByteArray &key);
-signals:
- void entryReady(QNetworkAccessCache::CacheableObject *);
-
protected:
void timerEvent(QTimerEvent *) override;
@@ -86,7 +83,6 @@ private:
void linkEntry(const QByteArray &key);
bool unlinkEntry(const QByteArray &key);
void updateTimer();
- bool emitEntryReady(Node *node, QObject *target, const char *member);
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QNetworkAccessCache::CacheableObject::Options)
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 6428653de26..66bb65685fa 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -216,6 +216,19 @@ static void ensureInitialized()
can be:
\snippet code/src_network_access_qnetworkaccessmanager.cpp 1
+ Since Qt 6.11 the defaults of the TCP Keepalive parameters used by
+ QNetworkAccessManager have been changed. With the current settings
+ the connection will be terminated after 2 minutes of inactivity.
+
+ These settings can be changed the individual requests, to make
+ them more lenient, or even more aggressive via the QNetworkRequest API.
+ \snippet http/httpwindow.cpp qnam-tcpkeepalive
+
+ In the above snippet we are picking a more aggressive strategy, to
+ terminate the connection after thirty seconds of inactivity. This can
+ be useful, for example, in early detection of network hangs caused
+ by network changes on Linux.
+
\sa QNetworkRequest, QNetworkReply, QNetworkProxy
*/