Bug 40543 - return QWebElement& from QWebElement::setAttribute()
Summary: return QWebElement& from QWebElement::setAttribute()
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2010-06-13 02:29 PDT by Piotr Dobrogost
Modified: 2010-06-16 02:12 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Dobrogost 2010-06-13 02:29:01 PDT
How about returning QWebElement& from QWebElement::setAttribute() to make chaining possible?
I guess other methods of QWebElement could take advantage from this change as well.
Comment 1 Kent Hansen 2010-06-15 11:07:45 PDT
Changing the return type is not binary compatible (see http://techbase.kde.org/Policies/Binary_Compatibility_Examples#Change_the_return_type).
It could be done for Qt 5, though.
Tor Arne, what do you think? Was this considered in the API reviews?
Comment 2 Antonio Gomes 2010-06-15 17:17:38 PDT
maybe RESOLVED - LATER instead of INVALID, so we can revisit it at some point?
Comment 3 Tor Arne Vestbø 2010-06-16 02:12:21 PDT
Chaining was not considered a goal for this API, as in most cases a normal semi-colon and multiple statements does the same job and is more in line with Qt's existing APIs.

foo.setAttribute("foo", "bar");
foo.setAttribute("biz", "baz");