diff options
Diffstat (limited to 'basicsuite/webengine/main.qml')
-rw-r--r-- | basicsuite/webengine/main.qml | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/basicsuite/webengine/main.qml b/basicsuite/webengine/main.qml index 2e1f259..39ac91d 100644 --- a/basicsuite/webengine/main.qml +++ b/basicsuite/webengine/main.qml @@ -56,49 +56,19 @@ Rectangle { width: 1280 height: 800 - property url defaultUrl: Qt.resolvedUrl("about:blank") + property url defaultUrl: Qt.resolvedUrl("content/index.html") function load(url) { mainWebView.url = url } - ErrorPage { - id: errorPage - anchors.fill: parent - displayingError: false - } - WebEngineView { id: mainWebView anchors.fill: parent url: defaultUrl - visible: !errorPage.displayingError onLoadingChanged: { if (!loading) { addressBar.cursorPosition = 0 } - var loadError = loadRequest.errorDomain - if (loadError == WebEngineView.NoErrorDomain) { - errorPage.displayingError = false - return; - } - errorPage.displayingError = true - if (loadError == WebEngineView.InternalErrorDomain) - errorPage.mainMessage = "Internal error" - else if (loadError == WebEngineView.ConnectionErrorDomain) - errorPage.mainMessage = "Unable to connect to the Internet" - else if (loadError == WebEngineView.CertificateErrorDomain) - errorPage.mainMessage = "Certificate error" - else if (loadError == WebEngineView.DnsErrorDomain) - errorPage.mainMessage = "Unable to resolve the server's DNS address" - else // HTTP and FTP - errorPage.mainMessage = "Protocol error" } onActiveFocusChanged: activeFocus ? hideTimer.running = true : toolBar.state = "address" - - Timer { - interval: 1500 - running: false - onTriggered: defaultUrl = Qt.resolvedUrl("content/index.html") - Component.onCompleted: start() - } } MultiPointTouchArea { |