From 41ec43e4a5c2f8a0b5cfc025d2a1159b2d0dfb2d Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 20 Jan 2020 18:53:06 +0100
Subject: [PATCH] gemini: restore WebKit support for dropbox

Reverts upstream 23e6060411e4eac69d79458515a27db6963e51cd.

This allows Gemini to be used on systems without support for
Qt5 WebEngine.
---
 .../qml/welcomepages/cloud/dropbox/DropboxWebView.qml  | 10 +++++-----
 gemini/qml/welcomepages/cloud/dropbox/LoginPage.qml    |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/gemini/qml/welcomepages/cloud/dropbox/DropboxWebView.qml b/gemini/qml/welcomepages/cloud/dropbox/DropboxWebView.qml
index 9f4bb7a..3a21379 100644
--- a/gemini/qml/welcomepages/cloud/dropbox/DropboxWebView.qml
+++ b/gemini/qml/welcomepages/cloud/dropbox/DropboxWebView.qml
@@ -18,18 +18,18 @@
 
 import QtQuick 2.11
 import QtQuick.Controls 2.5 as QtControls
-import QtWebEngine 1.5
+import QtWebKit 3.0
 
-WebEngineView {
+WebView {
     id: webView
     anchors.fill: parent
 
 //    experimental.userAgent: "Mozilla/5.0 (Linux; U; like Android 4.0.3; ko-kr; Jolla Build/Alpha) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"
     onLoadingChanged: {
-        if(loadRequest.status == WebEngineView.LoadSucceededStatus) {
+        if(status == WebView.LoadSucceededStatus) {
             tryingText.visible = false;
-            if(loadRequest.url.toString().length === 48) {  controllerMIT.oauth_v1_access_token() }
-    //        if(loadRequest.url.toString().length === 140) experimental.test.touchTap(webView, 100, 150)
+            if(url.toString().length === 48) {  controllerMIT.oauth_v1_access_token() }
+    //        if(url.toString().length === 140) experimental.test.touchTap(webView, 100, 150)
         }
     }
 
diff --git a/gemini/qml/welcomepages/cloud/dropbox/LoginPage.qml b/gemini/qml/welcomepages/cloud/dropbox/LoginPage.qml
index 6a02f7b..6680beb 100644
--- a/gemini/qml/welcomepages/cloud/dropbox/LoginPage.qml
+++ b/gemini/qml/welcomepages/cloud/dropbox/LoginPage.qml
@@ -18,6 +18,7 @@
 
 import QtQuick 2.11
 import org.kde.kirigami 2.7 as Kirigami
+import QtWebKit 3.0
 import "../../../components"
 
 Kirigami.Page {
-- 
2.24.0
