summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-09-28 11:14:23 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-09-28 11:14:23 (GMT)
commit38d7fb497eec5491e2d845e7eb5522dafc6ab42b (patch)
tree9b51ec779b10296ce1cc8ebae29d069c1d2edd55 /src/network
parent2868302626b8a31f44df1068514485a89ec27171 (diff)
parent7b796b4dcdebfba55c4754d241edb334217fc550 (diff)
downloadQt-38d7fb497eec5491e2d845e7eb5522dafc6ab42b.zip
Qt-38d7fb497eec5491e2d845e7eb5522dafc6ab42b.tar.gz
Qt-38d7fb497eec5491e2d845e7eb5522dafc6ab42b.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/painting/qrasterizer.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/mainwindow.cpp
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qfilenetworkreply.cpp5
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp5
-rw-r--r--src/network/kernel/qhostinfo.cpp19
-rw-r--r--src/network/network.pro15
4 files changed, 17 insertions, 27 deletions
diff --git a/src/network/access/qfilenetworkreply.cpp b/src/network/access/qfilenetworkreply.cpp
index 8c0fd17..73965f4 100644
--- a/src/network/access/qfilenetworkreply.cpp
+++ b/src/network/access/qfilenetworkreply.cpp
@@ -96,7 +96,10 @@ QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req
QString fileName = url.toLocalFile();
if (fileName.isEmpty()) {
- fileName = url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery);
+ if (url.scheme() == QLatin1String("qrc"))
+ fileName = QLatin1Char(':') + url.path();
+ else
+ fileName = url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery);
}
QFileInfo fi(fileName);
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 234305e..86b1c66 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -949,10 +949,9 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
bool isLocalFile = req.url().isLocalFile();
// fast path for GET on file:// URLs
- // The QNetworkAccessFileBackend will right now only be used
- // for PUT or qrc://
+ // The QNetworkAccessFileBackend will right now only be used for PUT
if ((op == QNetworkAccessManager::GetOperation || op == QNetworkAccessManager::HeadOperation)
- && isLocalFile) {
+ && (isLocalFile || req.url().scheme() == QLatin1String("qrc"))) {
return new QFileNetworkReply(this, req, op);
}
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 7908182..e033689 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -448,14 +448,17 @@ void QHostInfoRunnable::run()
resultEmitter.emitResultsReady(hostInfo);
// now also iterate through the postponed ones
- QMutableListIterator<QHostInfoRunnable*> iterator(manager->postponedLookups);
- while (iterator.hasNext()) {
- QHostInfoRunnable* postponed = iterator.next();
- if (toBeLookedUp == postponed->toBeLookedUp) {
- // we can now emit
- iterator.remove();
- hostInfo.setLookupId(postponed->id);
- postponed->resultEmitter.emitResultsReady(hostInfo);
+ {
+ QMutexLocker locker(&manager->mutex);
+ QMutableListIterator<QHostInfoRunnable*> iterator(manager->postponedLookups);
+ while (iterator.hasNext()) {
+ QHostInfoRunnable* postponed = iterator.next();
+ if (toBeLookedUp == postponed->toBeLookedUp) {
+ // we can now emit
+ iterator.remove();
+ hostInfo.setLookupId(postponed->id);
+ postponed->resultEmitter.emitResultsReady(hostInfo);
+ }
}
}
diff --git a/src/network/network.pro b/src/network/network.pro
index 5e33080..7ed7d3a 100644
--- a/src/network/network.pro
+++ b/src/network/network.pro
@@ -28,19 +28,4 @@ QMAKE_LIBS += $$QMAKE_LIBS_NETWORK
symbian {
TARGET.UID3=0x2001B2DE
LIBS += -lesock -linsock -lcertstore -lefsrv -lctframework
-
- # Partial upgrade SIS file
- vendorinfo = \
- "; Localised Vendor name" \
- "%{\"Nokia, Qt\"}" \
- " " \
- "; Unique Vendor name" \
- ":\"Nokia, Qt\"" \
- " "
- pu_header = "; Partial upgrade package for testing QtGui changes without reinstalling everything" \
- "$${LITERAL_HASH}{\"Qt network\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU"
- partial_upgrade.pkg_prerules = pu_header vendorinfo
- partial_upgrade.sources = $$QMAKE_LIBDIR_QT/QtNetwork.dll
- partial_upgrade.path = c:/sys/bin
- DEPLOYMENT = partial_upgrade $$DEPLOYMENT
}