[webkit-qt] Checking the HTTP status code of more than one instance of QWebPage

Alexandre Pretyman alexandre.pretyman at gmail.com
Fri Mar 30 07:44:17 PDT 2012


Hi list,

I'm using Qt 4.8 release from QtSDK 1.1.5 and the QtWebKit API that comes
with it.

I'm checking the HTTP Status of a page loaded in a QWebFrame with code as
described in this StackOverflow post:
http://stackoverflow.com/questions/4330274/qtwebkit-how-to-check-http-status-code,
which essentially tells me to connect to
SIGNAL(finished(QNetworkReply*))  on the QNetworkAccessManager assiciated
with the QWebPage and examine reply->attribute(QNetworkRequest::
HttpStatusCodeAttribute) to get the HTTP status code

This has been working well since I've been using a single QWebPage, but now
I need more than one instance of QWebPage running.

Since the recommended practice is to have one QNetworkAcessManager per
application, if I connect to SIGNAL(finished(QNetworkReply*)) , I
understand I'll be getting QNetworkReply * from both instances, and won't
be able to differentiate which came from which.

How can I overcome this?

Regards,
-- 
Alexandre Pretyman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20120330/0cf1e0c4/attachment.html>


More information about the webkit-qt mailing list