[Webkit-unassigned] [Bug 30772] [Qt] Review the API of QWebElementCollection

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 26 10:58:00 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=30772


Kenneth Rohde Christiansen <kenneth at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kenneth at webkit.org




--- Comment #1 from Kenneth Rohde Christiansen <kenneth at webkit.org>  2009-10-26 10:58:00 PDT ---
(In reply to comment #0)
> QWebElementCollection has been added back in
> https://bugs.webkit.org/show_bug.cgi?id=30767. The current API is the original,
> unreviewed, one.
> 
> Here is my suggestions:
> 
> 1) Give a coherent API using iterator (related to (1)):  

1?

> -QWebElement QWebElementCollection::first() const
> +iterator QWebElementCollection::begin()
> -QWebElement QWebElementCollection::last() const
> +iterator QWebElementCollection::end()

True, but QVector/QList actually have first() methods.

> 2) The API could be modified to enable lazy population in the future.
> The following changes would be required:
> -changes of (1)
> -int QWebElementCollection::count() const;
> -QWebElement QWebElementCollection::at(int i) const;
> -QWebElement QWebElementCollection::operator[](int i) const
> 
> 
> If the changes of (2) are made, it could make sense to remove
> QWebElement::findFirst() because it would be equivalent to
> QWebElement::findAll().begin().

True, but it might be a bit harder to find and make the resulting code a bit
more obscure.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list