[webkit-reviews] review requested: [Bug 30773] [Qt] QWebInspector: improve QWebPage::webInspectorTriggered(QWebElement&) -> QWebInspector::show() connection : [Attachment 42119] Patch: Remove the signal

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 29 11:44:34 PDT 2009


Jocelyn Turcotte <jocelyn.turcotte at nokia.com> has asked  for review:
Bug 30773: [Qt] QWebInspector: improve
QWebPage::webInspectorTriggered(QWebElement&) -> QWebInspector::show()
connection
https://bugs.webkit.org/show_bug.cgi?id=30773

Attachment 42119: Patch: Remove the signal
https://bugs.webkit.org/attachment.cgi?id=42119&action=review

------- Additional Comments from Jocelyn Turcotte <jocelyn.turcotte at nokia.com>
This patch remove the signal for this release since it is not perfect yet and
we think that it's use is not mandatory for now.

The only scenario I could think of is if somebody wants to lazily create the
QWebInspector object until the first trigger through the context menu. This
scenario can still be achieved in the 4.6 release by subclassing QWebPage and
override ::triggerAction for InspectElement actions.

IMPORTANT: ===> 
We can remove the signal from 4.6 only if we all agree that in the future the
signal connections between QWebPage and QWebInspector will be done
automatically in QWebInspector::setPage(QWPage*).
This would allow us to change the "magic" behavior of 4.6 by an "automatically
connected signals" behavior in 4.7.
Right now in trunk, this connection has to be made by the developer, which is
not convenient since being able to change it is useless power in 95% of the
time.

== Explanation:
// In 4.6
QWebInspector *inspector = new QWebInspector;
inspector->setPage(page) // <-- In there, QWebPage keeps a pointer to the
			 // inspector and in trigger action, calls 
			 // insp->show() and sets its element

// In 4.7
QWebInspector *inspector = new QWebInspector;
inspector->setPage(page) // <-- In there, signals from QWebPage are
			 // connected to the show() and
			 // setInspectedElement(QWE&) slots


More information about the webkit-reviews mailing list