WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 29975
25166
[Qt] Add QWebFrame::requestCount() method for obtaining the number of associated resource requests.
https://bugs.webkit.org/show_bug.cgi?id=25166
Summary
[Qt] Add QWebFrame::requestCount() method for obtaining the number of associa...
Jakub Wieczorek
Reported
2009-04-13 15:56:19 PDT
Added QWebFrame::requestCount() method with following signature: int requestCount(RequestStates state = RequestsAll, bool recursive = true) const; The function returns number of requests (of specified status) that have been started along with creation of the frame. RequestState enumerates following types of requests: RequestsUnfinished = 1, RequestsCompleted = 2, RequestsFailed = 4, RequestsAll = RequestsUnfinished | RequestsCompleted | RequestsFailed recursive specifies whether the request count should be determined including the child frames and its resources or not. The recursive call on the main frame is also wrapped in QWebPage::requestCount() method. Patch with autotest attached.
Attachments
patch
(11.30 KB, patch)
2009-04-13 15:57 PDT
,
Jakub Wieczorek
no flags
Details
Formatted Diff
Diff
patch
(11.30 KB, patch)
2009-04-13 15:57 PDT
,
Jakub Wieczorek
ariya.hidayat
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jakub Wieczorek
Comment 1
2009-04-13 15:57:18 PDT
Created
attachment 29443
[details]
patch
Jakub Wieczorek
Comment 2
2009-04-13 15:57:28 PDT
Created
attachment 29444
[details]
patch
Simon Hausmann
Comment 3
2009-04-14 13:23:53 PDT
I understand the motivation behind retrieving this information, but I think it's not functionality frequently used enough to have a dedicated method in QWebFrame. In theory you can determine all this already using the public API by setting a custom network access manager on a page and keeping track of the issued network requests and their results. If at all I'd prefer if WebKit wouldn't keep track of those counts but instead just emit notification signals and let the application decide how to count. What do you think?
Jakub Wieczorek
Comment 4
2009-04-14 14:21:55 PDT
Keeping track of requests and their results in a custom QNetworkAccessManager wouldn't be a solution if one wanted to know which particular frame they had come from and while it seems to be the most probable use case it's also the main point here. But yes, I like the idea about signals. void requestCreated(const QUrl &); void requestFinished(const QUrl &); void requestFailed(const QUrl &); or even rather QNetworkRequest instead of QUrl. What do you say?
Holger Freyther
Comment 5
2009-05-11 03:50:53 PDT
Comment on
attachment 29443
[details]
patch Make one of the two copies drop out of the review queue.
Ariya Hidayat
Comment 6
2009-06-08 04:03:03 PDT
Comment on
attachment 29444
[details]
patch I also agree to use a signal passing the URL or the network reply (please evaluate which one fits the use case better). r- until the new patch is ready.
Piotr Dobrogost
Comment 7
2009-09-07 09:29:29 PDT
What about using custom requests/replies by QtWebKit and placing additional information (about frame in this case) there?
Simon Hausmann
Comment 8
2009-11-24 06:48:08 PST
*** This bug has been marked as a duplicate of
bug 29975
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug