Bug 30767 - [Qt] Reintroduce QWebElementCollection
Summary: [Qt] Reintroduce QWebElementCollection
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: Qt
Depends on:
Blocks: Qt46 30772
  Show dependency treegraph
Reported: 2009-10-26 03:35 PDT by Benjamin Poulain
Modified: 2009-10-26 10:35 PDT (History)
5 users (show)

See Also:

Path to replace QList<QWebElement> by QWebElementCollection (26.16 KB, patch)
2009-10-26 03:53 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2009-10-26 03:35:42 PDT
The function findAll() of QWebElement returns a QList of QWebElement. This return type does not give any flexibility to upgrade the API later, (like adding filtering on the list, or lazy population).

To add some flexibility, a d-pointer is needed in the return type. The type QWebElementCollection should be reintroduced.
Comment 1 Benjamin Poulain 2009-10-26 03:53:51 PDT
Created attachment 41858 [details]
Path to replace QList<QWebElement> by QWebElementCollection

This patch basically revert the commit 42994  (e4ed760783109673896551892c029dc043c70b71 on git).

The changes from the original patch are:
-QWebElement operator[] do not return a const QWebElement anymore to be coherent with the previous use of QList
-The new tests had to be adapted.

If the idea is accepted and we reintroduce QWebElementCollection, a new bug should be created in the tree 29843 to review the API of QWebElementCollection.
Comment 2 Tor Arne Vestbø 2009-10-26 05:57:21 PDT
LGTM, feel free to create an API-spinoff
Comment 3 WebKit Commit Bot 2009-10-26 06:06:12 PDT
Comment on attachment 41858 [details]
Path to replace QList<QWebElement> by QWebElementCollection

Clearing flags on attachment: 41858

Committed r50058: <http://trac.webkit.org/changeset/50058>
Comment 4 WebKit Commit Bot 2009-10-26 06:06:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Kenneth Rohde Christiansen 2009-10-26 10:35:25 PDT
I guess we need to add a follow up bug report reviewing all the API of this new class.