summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-01-11 01:49:48 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-01-11 01:49:48 (GMT)
commitba6816d194423d220ba34a5e0b57aa5b97af942c (patch)
treead60967a657978339e31b6e7447303bad894008b
parent71c73f80050fda96111122cc75676df60b51b0f5 (diff)
downloadQt-ba6816d194423d220ba34a5e0b57aa5b97af942c.zip
Qt-ba6816d194423d220ba34a5e0b57aa5b97af942c.tar.gz
Qt-ba6816d194423d220ba34a5e0b57aa5b97af942c.tar.bz2
Move choice of pipelining to the point request.
(based on advice from Thiago)
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp1
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimagebase.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp2
-rw-r--r--src/declarative/util/qmlfontloader.cpp1
-rw-r--r--src/declarative/util/qmlpixmapcache.cpp1
-rw-r--r--tools/qmlviewer/qmlviewer.cpp13
6 files changed, 3 insertions, 17 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
index 670b38b..e01e569 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
@@ -238,6 +238,7 @@ void QmlGraphicsAnimatedImage::setSource(const QUrl &url)
#endif
d->status = Loading;
QNetworkRequest req(d->url);
+ req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
d->reply = qmlEngine(this)->networkAccessManager()->get(req);
QObject::connect(d->reply, SIGNAL(finished()),
this, SLOT(movieRequestFinished()));
diff --git a/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp b/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp
index e3b98aa..08617ac 100644
--- a/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp
@@ -45,8 +45,6 @@
#include <qmlengine.h>
#include <qmlpixmapcache_p.h>
-#include <QNetworkRequest>
-#include <QNetworkReply>
#include <QFile>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
index aa73444..dd685d4 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
@@ -56,8 +56,6 @@
#include <QPen>
#include <QFile>
#include <QEvent>
-#include <QNetworkReply>
-#include <QNetworkRequest>
#include <QGraphicsSceneMouseEvent>
#include <QtScript/qscriptengine.h>
#include <QtGui/qgraphicstransform.h>
diff --git a/src/declarative/util/qmlfontloader.cpp b/src/declarative/util/qmlfontloader.cpp
index 8230b1a..42b34b5 100644
--- a/src/declarative/util/qmlfontloader.cpp
+++ b/src/declarative/util/qmlfontloader.cpp
@@ -134,6 +134,7 @@ void QmlFontLoader::setSource(const QUrl &url)
#endif
{
QNetworkRequest req(d->url);
+ req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
d->reply = qmlEngine(this)->networkAccessManager()->get(req);
QObject::connect(d->reply, SIGNAL(finished()), this, SLOT(replyFinished()));
}
diff --git a/src/declarative/util/qmlpixmapcache.cpp b/src/declarative/util/qmlpixmapcache.cpp
index 3307ff8..6f36cad 100644
--- a/src/declarative/util/qmlpixmapcache.cpp
+++ b/src/declarative/util/qmlpixmapcache.cpp
@@ -404,6 +404,7 @@ QmlPixmapReply *QmlPixmapCache::request(QmlEngine *engine, const QUrl &url)
QmlPixmapReplyHash::Iterator iter = qmlActivePixmapReplies.find(key);
if (iter == qmlActivePixmapReplies.end()) {
QNetworkRequest req(url);
+ req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
QmlPixmapReply *item = new QmlPixmapReply(key, engine->networkAccessManager()->get(req));
iter = qmlActivePixmapReplies.insert(key, item);
} else {
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp
index 60208d2..21288c4 100644
--- a/tools/qmlviewer/qmlviewer.cpp
+++ b/tools/qmlviewer/qmlviewer.cpp
@@ -291,18 +291,6 @@ private:
QString customargs;
};
-class ConfiguredNetworkAccessManager : public QNetworkAccessManager {
-public:
- ConfiguredNetworkAccessManager(QObject *parent) : QNetworkAccessManager(parent) { }
-
- QNetworkReply *createRequest (Operation op, const QNetworkRequest &req, QIODevice * outgoingData)
- {
- QNetworkRequest request = req;
- request.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
- return QNetworkAccessManager::createRequest(op,request,outgoingData);
- }
-};
-
class PersistentCookieJar : public QNetworkCookieJar {
public:
PersistentCookieJar(QObject *parent) : QNetworkCookieJar(parent) { load(); }
@@ -383,7 +371,6 @@ QmlViewer::QmlViewer(QWidget *parent, Qt::WindowFlags flags)
canvas->setAttribute(Qt::WA_OpaquePaintEvent);
canvas->setAttribute(Qt::WA_NoSystemBackground);
canvas->setContentResizable(!skin || !scaleSkin);
- canvas->engine()->setNetworkAccessManager(new ConfiguredNetworkAccessManager(canvas->engine()));
canvas->setFocus();
QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize)));