summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-22 16:00:11 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-22 16:00:11 (GMT)
commit152c2e47eba67d7f9f1aefe4ab45c40592716c90 (patch)
treee8c43db915cf827157a14d22281eecdb9da90bc7 /src/network
parent1c47be7174ca1e9ed393a12461742975079710d7 (diff)
parent27f566fb608d9465110dc67d16fe8f88ee9d4a0a (diff)
downloadQt-152c2e47eba67d7f9f1aefe4ab45c40592716c90.zip
Qt-152c2e47eba67d7f9f1aefe4ab45c40592716c90.tar.gz
Qt-152c2e47eba67d7f9f1aefe4ab45c40592716c90.tar.bz2
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (71 commits) Revert "Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cpp" Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cpp Fixing the wrong QUrl usage When on Symbian use smaller files. correctly position glyphs for complex languages Removed inneccessary QGlyphLayout::offsets initialization. Fix mirrored characters for RTL text in Symbian QNAM: Add a code comment related to the cache tst_QSystemSemaphore::processes fixed for WinCE tst_qsystemsemaphore: fix deployment of lackey.exe for WinCE tst_qsharedmemory: create multiple instances of lackey.exe on WinCE tst_qsharedmemory: fix deployment of lackey.exe for WinCE fix compilation of tst_sharedmemory on Windows CE QtScript: regression with instanceof operator for QMetaObject wrappers examples/widgets/stylesheet fix mainwindow.ui QStyleSheetStyle: fix memory leak on base style change QNAM HTTP: Fixed a bug when getting empty files with pipelining Fix window transparency on Symbian. Tweak the 'normalGeometry' of the widget before setting it. Use QDesktopWidget as a status pane observer on Symbian. ...
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp6
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp2
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp5
-rw-r--r--src/network/kernel/qhostinfo.cpp6
-rw-r--r--src/network/socket/qabstractsocket.cpp4
5 files changed, 17 insertions, 6 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index a6322a3..559124f 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -489,7 +489,11 @@ void QHttpNetworkConnectionPrivate::fillPipeline(QAbstractSocket *socket)
int i = indexOf(socket);
- if (! (defaultPipelineLength - channels[i].alreadyPipelinedRequests.length() >= 2)) {
+ // return fast if there was no reply right now processed
+ if (channels[i].reply == 0)
+ return;
+
+ if (! (defaultPipelineLength - channels[i].alreadyPipelinedRequests.length() >= defaultRePipelineLength)) {
return;
}
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index f9a6de8..57d995a 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -384,7 +384,7 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
if (!replyPrivate->expectContent()) {
replyPrivate->state = QHttpNetworkReplyPrivate::AllDoneState;
allDone();
- return;
+ break;
}
}
break;
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index c3dc168..07a5bf3 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -689,8 +689,13 @@ QNetworkReplyImpl::QNetworkReplyImpl(QObject *parent)
QNetworkReplyImpl::~QNetworkReplyImpl()
{
Q_D(QNetworkReplyImpl);
+
+ // This code removes the data from the cache if it was prematurely aborted.
+ // See QNetworkReplyImplPrivate::completeCacheSave(), we disable caching there after the cache
+ // save had been properly finished. So if it is still enabled it means we got deleted/aborted.
if (d->isCachingEnabled())
d->networkCache()->remove(url());
+
if (d->outgoingDataBuffer)
delete d->outgoingDataBuffer;
}
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 7e006e0..f287630 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -565,13 +565,11 @@ void QHostInfoLookupManager::work()
}
}
- if (scheduled && threadPool.tryStart(scheduled)) {
+ if (scheduled && currentLookups.size() < threadPool.maxThreadCount()) {
// runnable now running in new thread, track this in currentLookups
+ threadPool.start(scheduled);
iterator.remove();
currentLookups.append(scheduled);
- } else if (scheduled) {
- // wanted to start, but could not because thread pool is busy
- break;
} else {
// was postponed, continue iterating
continue;
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 21cd0fd..b604e89 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -2382,6 +2382,10 @@ void QAbstractSocket::disconnectFromHostImplementation()
#if defined(QABSTRACTSOCKET_DEBUG)
qDebug("QAbstractSocket::disconnectFromHost() aborting immediately");
#endif
+ if (d->state == HostLookupState) {
+ QHostInfo::abortHostLookup(d->hostLookupId);
+ d->hostLookupId = -1;
+ }
} else {
// Perhaps emit closing()
if (d->state != ClosingState) {