Code review comment for lp:~abreu-alexandre/webbrowser-app/better-control-webengine-lib-loaded

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

> I would rather call setSource() on Component.onCompleted, in order to set all
> the properties at construction time.

100% agree, but it probably wont be able to make it for 14.04 then, since for a consulted reason
(see below) it requires a fix in unity-webapps-qml.

Reason:

in src/app/webcontainer/WebappContainerWebview.qm, the currentWebView property is bounded
to webappContainerWebViewLoader.item (which makes sense). This property is then bounded to
& used by the UnityWebapps qml element to inject the proper API & search for the proper
webapp locally installed (if any) w/ the proper name to know its homepage, etc.

The thing is that the Webapps qml element does not atm property listen to its bounded
webview property changes. So it considers that at Component.onCompleted time it should be
done.

Delaying a bit the creation of the webview backend will hand off the value null (since
it has not been created at qml property eval time) to the Webapps element and prevent
the webapp from doing anything (even navigating).

« Back to merge proposal