[Qt][WK2] Make QWebError more friendly to QML.
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Sep 2011 16:54:57 +0000 (16:54 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Sep 2011 16:54:57 +0000 (16:54 +0000)
commita99d30e48435cd4c95cc923e9e8722791f01d540
tree2b044cddb3bc49260fdee1c8deefe3d525f6cfdd
parentc128fea4d3b5513b1baa7e6915c66f57fdb6030e
[Qt][WK2] Make QWebError more friendly to QML.
https://bugs.webkit.org/show_bug.cgi?id=67785

Reviewed by Simon Hausmann.

Make sure that we can use the loading errors in QML. We send it via a QJSValue which
has the properties needed to get the error code, the url and the type of error.

* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::loadDidFail):
(QDesktopWebViewPrivate::engine):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
(tst_CommonViewTests::loadNonexistentFileUrl):
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
(WebViewAbstraction::WebViewAbstraction):
(WebViewAbstraction::touchViewLoadFailed):
(WebViewAbstraction::desktopViewLoadFailed):
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
* UIProcess/API/qt/tests/testwindow.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::loadDidFail):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/TouchViewInterface.cpp:
(WebKit::TouchViewInterface::loadDidFail):
(WebKit::TouchViewInterface::engine):
* UIProcess/qt/TouchViewInterface.h:
* UIProcess/qt/ViewInterface.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp
Source/WebKit2/UIProcess/API/qt/qdesktopwebview.h
Source/WebKit2/UIProcess/API/qt/qdesktopwebview_p.h
Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h
Source/WebKit2/UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp
Source/WebKit2/UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp
Source/WebKit2/UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h
Source/WebKit2/UIProcess/API/qt/tests/testwindow.h
Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp
Source/WebKit2/UIProcess/qt/QtWebPageProxy.h
Source/WebKit2/UIProcess/qt/TouchViewInterface.cpp
Source/WebKit2/UIProcess/qt/TouchViewInterface.h
Source/WebKit2/UIProcess/qt/ViewInterface.h