[webkit-qt] Page loading status API could be improved
Jocelyn Turcotte
jocelyn.turcotte at nokia.com
Sun Apr 1 10:51:32 PDT 2012
Developers would now have to check for 3 different load statuses to know if the load finished.
If we can make sure that they will use WebView::loading instead of individual status to check the general started/finished case then I think it makes sense too.
Let's try to make it clear in the documentation.
cheers,
Jocelyn
On Fri, 30 Mar 2012 20:46:18 +0000
"ext simon.hausmann at nokia.com" <simon.hausmann at nokia.com> wrote:
> LoadStoppedStatus makes sense to me. What do the others think?
>
> Simon
>
> --
> Sendt fra min Nokia N930.03.12 22:29 skrev ext Marcelo Lira:
> Hi all,
>
> In Qt5/WebKit2, when monitoring the loading of a page in a WebView,
> before the loading is complete I call WebView.stop(). After stoping,
> WebView.loadRequest.status will be set to WebView.LoadFailedStatus.
> But this is no error, since the load was intentionally interrupted.
>
> To know if the LoadFailedStatus represents an intentional stop to the
> loading process, I have to check also loadRequest.errorCode, as in the
> QML code below:
>
> WebView {
> onLoadingChanged: {
> if (loadRequest.status !== WebView.LoadFailedStatus
> || loadRequest.errorCode === NetworkReply.OperationCanceledError)
> return; // Not an error, user stopped the page loading.
> (...)
> // Check for real errors.
> }
> }
>
> Checking QQuickWebView I saw these possible load statuses:
>
> enum LoadStatus {
> LoadStartedStatus,
> LoadSucceededStatus,
> LoadFailedStatus
> };
>
> It seems to me that a LoadStoppedStatus would make more sense for the
> case I'm describing, and also make the checking code simpler.
> Does any one agree with this? Should I fill a bug, or leave it be?
>
> Cheers,
> Marcelo
> _______________________________________________
> webkit-qt mailing list
> webkit-qt at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
> _______________________________________________
> webkit-qt mailing list
> webkit-qt at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
More information about the webkit-qt
mailing list