[webkit-dev] Handling upload progresses

Holger Freyther zecke at selfish.org
Tue Nov 11 18:16:13 PST 2008


On Wednesday 12 November 2008 02:16:03 André Pedralho wrote:

> A network reply handler might be good, but if could not get a network
> reply when one upload starts I guess I will not be able to get a
> handler for it...
>
> Did I miss something?

Well, you can set the QNetworkAccessManager or such. QNetworkReplyHandler.cpp 
is asking that class for the post job.


you could build something like this (proxy, fascade whatever you want to call 
it):

class MyNetworkAccessManager : public QNetworkAccessManager {

QNetworkReply* post(const QUrl& url) {
   QNetworkReply* reply = QNetworkAccessManager::post(url);
   doSomething(reply);
   return reply;
}
};

and set your class on the QWebPage (or a bit more complex if you want to wrap 
any existing QNetworkAccessManager...)

z.


More information about the webkit-dev mailing list