Merge lp:~mardy/signon-ui/no-webkit-1547647 into lp:signon-ui

Proposed by Alberto Mardegan
Status: Merged
Approved by: David Barth
Approved revision: 147
Merged at revision: 144
Proposed branch: lp:~mardy/signon-ui/no-webkit-1547647
Merge into: lp:signon-ui
Diff against target: 123 lines (+28/-16)
6 files modified
src/qml/DefaultPage.qml (+1/-1)
src/qml/MainWindow.qml (+2/-2)
src/qml/WebView.qml (+21/-9)
src/qquick-dialog.cpp (+1/-1)
src/request.cpp (+1/-3)
src/ubuntu-browser-request.cpp (+2/-0)
To merge this branch: bzr merge lp:~mardy/signon-ui/no-webkit-1547647
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Online Accounts Pending
Review via email: mp+291084@code.launchpad.net

Commit message

Update Ubuntu.Web backend, make it the default on Unity

Bring the oxide-based WebView in par with the implementation used in ubuntu-system-settings-online-accounts.
Make it the default when running under a Unity session.

Description of the change

Update Ubuntu.Web backend, make it the default on Unity

Bring the oxide-based WebView in par with the implementation used in ubuntu-system-settings-online-accounts.
Make it the default when running under a Unity session.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/DefaultPage.qml'
2--- src/qml/DefaultPage.qml 2013-10-11 07:23:04 +0000
3+++ src/qml/DefaultPage.qml 2016-04-06 08:01:23 +0000
4@@ -1,5 +1,5 @@
5 import QtQuick 2.0
6-import Ubuntu.Components 0.1
7+import Ubuntu.Components 1.3
8
9 Page {
10 Loader {
11
12=== modified file 'src/qml/MainWindow.qml'
13--- src/qml/MainWindow.qml 2014-04-23 09:29:07 +0000
14+++ src/qml/MainWindow.qml 2016-04-06 08:01:23 +0000
15@@ -1,7 +1,7 @@
16 import QtQuick 2.0
17-import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.3
19
20-MainView {
21+Item {
22 id: root
23 width: units.gu(60)
24 height: units.gu(90)
25
26=== modified file 'src/qml/WebView.qml'
27--- src/qml/WebView.qml 2014-04-22 09:35:17 +0000
28+++ src/qml/WebView.qml 2016-04-06 08:01:23 +0000
29@@ -1,24 +1,36 @@
30 import QtQuick 2.0
31-import Ubuntu.Components 0.1
32-import Ubuntu.Components.Extras.Browser 0.2
33-import com.canonical.Oxide 1.0
34-
35-UbuntuWebView {
36+import Ubuntu.Components 1.3
37+import Ubuntu.Web 0.2
38+
39+WebView {
40+ id: root
41+
42 Component.onCompleted: url = signonRequest.startUrl
43
44- onLoadingChanged: {
45+ onLoadingStateChanged: {
46 console.log("Loading changed")
47- if (loading) {
48+ if (loading && !lastLoadFailed) {
49 signonRequest.onLoadStarted()
50 } else if (lastLoadSucceeded) {
51 signonRequest.onLoadFinished(true)
52- } else {
53+ } else if (lastLoadFailed) {
54 signonRequest.onLoadFinished(false)
55 }
56 }
57 onUrlChanged: signonRequest.currentUrl = url
58
59- context: UbuntuWebContext {
60+ context: WebContext {
61 dataPath: rootDir
62 }
63+
64+ /* Taken from webbrowser-app */
65+ ProgressBar {
66+ anchors.top: parent.top
67+ anchors.left: parent.left
68+ anchors.right: parent.right
69+ height: units.dp(3)
70+ showProgressPercentage: false
71+ visible: root.loading
72+ value: root.loadProgress / 100
73+ }
74 }
75
76=== modified file 'src/qquick-dialog.cpp'
77--- src/qquick-dialog.cpp 2014-04-07 12:39:16 +0000
78+++ src/qquick-dialog.cpp 2016-04-06 08:01:23 +0000
79@@ -33,7 +33,6 @@
80 QQuickView(parent)
81 {
82 setResizeMode(QQuickView::SizeRootObjectToView);
83- setWindowState(Qt::WindowFullScreen);
84 }
85
86 Dialog::~Dialog()
87@@ -42,6 +41,7 @@
88
89 void Dialog::show(WId parent, ShowMode mode)
90 {
91+ create();
92 #if HAS_FOREIGN_QWINDOW
93 if (mode != TopLevel) {
94 QWindow *parentWindow = QWindow::fromWinId(parent);
95
96=== modified file 'src/request.cpp'
97--- src/request.cpp 2015-07-13 08:57:18 +0000
98+++ src/request.cpp 2016-04-06 08:01:23 +0000
99@@ -312,10 +312,8 @@
100 if (parameters.contains(SSOUI_KEY_OPENURL)) {
101 #ifdef USE_UBUNTU_WEB_VIEW
102 TRACE() << "Platform:" << QGuiApplication::platformName();
103- /* We need to use the RemoteRequest implementation in UbuntuTouch,
104- * because displaying of QtWidgets is not working there. This is a
105- * workaround which can be revisited later. */
106 if (QGuiApplication::platformName().startsWith("ubuntu") ||
107+ qgetenv("XDG_CURRENT_DESKTOP") == QByteArray("Unity") ||
108 qgetenv("SSOUI_USE_UBUNTU_WEB_VIEW") == QByteArray("1")) {
109 return new UbuntuBrowserRequest(connection, message,
110 parameters, parent);
111
112=== modified file 'src/ubuntu-browser-request.cpp'
113--- src/ubuntu-browser-request.cpp 2014-04-25 11:53:59 +0000
114+++ src/ubuntu-browser-request.cpp 2016-04-06 08:01:23 +0000
115@@ -226,6 +226,8 @@
116 Q_Q(UbuntuBrowserRequest);
117
118 TRACE() << "Browser dialog closed";
119+ QObject::disconnect(m_dialog, SIGNAL(finished(int)),
120+ this, SLOT(onFinished()));
121
122 QVariantMap reply;
123 QUrl url = m_responseUrl.isEmpty() ? m_currentUrl : m_responseUrl;

Subscribers

People subscribed via source and target branches

to all changes: