[neon/backports-jammy/signon-ui/Neon/unstable] debian: add patches for upstream and fedora stuff so the borked ubuntu tarball actually will do something

Carlos De Maine null at kde.org
Mon Sep 18 02:04:39 BST 2023


Git commit a4d72c29dab8c7109cb701a229c2bcbd3c3628f8 by Carlos De Maine.
Committed on 18/09/2023 at 03:04.
Pushed by carlosdem into branch 'Neon/unstable'.

add patches for upstream and fedora stuff so the borked ubuntu tarball actually will do something

A  +1    -0    debian/.gitattributes
A  +492  -0    debian/changelog
A  +39   -0    debian/control
A  +56   -0    debian/copyright
A  +2601 -0    debian/patches/0001_gitlab_tag_0.17+15.10.20150810-0ubuntu1.diff
A  +35   -0    debian/patches/0002_signon-ui-0.15-fix-qt5-build.diff
A  +12   -0    debian/patches/0003_fake-user-agent.diff
A  +3    -0    debian/patches/series
A  +21   -0    debian/rules
A  +7    -0    debian/salsa-ci.yml
A  +2    -0    debian/signon-ui-service.install
A  +2    -0    debian/signon-ui-x11.install
A  +1    -0    debian/source/format
A  +2    -0    debian/watch

https://invent.kde.org/neon/backports-jammy/signon-ui/-/commit/a4d72c29dab8c7109cb701a229c2bcbd3c3628f8

diff --git a/debian/.gitattributes b/debian/.gitattributes
new file mode 100644
index 0000000..6a03163
--- /dev/null
+++ b/debian/.gitattributes
@@ -0,0 +1 @@
+changelog merge=dpkg-mergechangelogs
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..c1e931e
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,492 @@
+signon-ui (0.17+16.04.20151125-1) unstable; urgency=medium
+
+  * Team upload.
+
+  [ Diane Trout ]
+  * New upstream release.
+
+  [ Pino Toscano ]
+  * Bump the debhelper compatibility to 13:
+    - switch the debhelper-compat build dependency to 13
+    - stop passing --fail-missing to dh_install, as it is the default for
+      dh_missing now
+  * Switch Vcs-* fields to salsa.debian.org.
+  * Add the configuration for the CI on salsa.
+  * Add Rules-Requires-Root: no.
+  * Trim trailing whitespace.
+  * Use secure copyright file specification URI.
+  * Update watch file format version to 4.
+  * Bump Standards-Version to 4.5.1, no changes required.
+  * Stop removing signon-ui-unittest, as it is not installed.
+  * Use /usr/share/dpkg/architecture.mk to make sure that $DEB_HOST_MULTIARCH
+    is always defined.
+  * Remove unused build dependencies: gdb, libgl1-mesa-dev | libgl-dev,
+    libgles2-mesa-dev | libgles2-dev, libicu-dev, libqt5opengl5-dev,
+    libsqlite3-dev, libxext-dev, libxslt1-dev, and libqt5sensors5-dev.
+  * Drop old signon-ui breaks/replaces, older than Stretch.
+
+ -- Pino Toscano <pino at debian.org>  Sat, 16 Jan 2021 23:22:58 +0100
+
+signon-ui (0.17+15.10.20150810-2) unstable; urgency=medium
+
+  * Update copyright file with more dates
+  * Remove libgstreamer-plugins-base1.0-dev from Build-Depends
+    (Closes: #800536)
+
+ -- Diane Trout <diane at debian.org>  Thu, 15 Oct 2015 10:51:17 -0700
+
+signon-ui (0.17+15.10.20150810-1) unstable; urgency=medium
+
+  * Prepare initial Debian release.
+  * Change maintainer to Debian qt-kde team, add myself as uploader
+  * Use QT_SELECT=qt5 in rules instead of qt5-default in build-dep
+  * Remove ubuntu-specific version number from qtbase5-dev
+  * Disable qtlocation5-dev from build-dep as Debian doesn't have it.
+  * Add xauth to build-dep needed for tests.
+  * Add myself to debian/* debian/copyright
+  * Remove signon-ui transitional package as we have never been released
+    to Debian.
+  * Remove Breaks/Replaces from signon-ui-service as we have never been
+    released to Debian
+  * Add watch file
+  * Add LGPL-2.1-QTexception-1.1 text to debian/copyright
+
+ -- Diane Trout <diane at debian.org>  Mon, 14 Sep 2015 22:06:53 -0700
+
+signon-ui (0.17+15.04.20150410-0ubuntu1) vivid; urgency=medium
+
+  [ Iain Lane ]
+  * src/signon.pro: Add 'quick' to the list of Qt modules used; we use
+    QQuickView
+
+ -- CI Train Bot <ci-train-bot at canonical.com>  Fri, 10 Apr 2015 08:47:04 +0000
+
+signon-ui (0.17+14.10.20140916-0ubuntu1) utopic; urgency=low
+
+  [ Colin Watson ]
+  * Add versioned Breaks/Replaces on signon-ui to signon-ui-x11 to fix
+    upgrades from before 0.17. (LP: #1363352)
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Tue, 16 Sep 2014 19:07:08 +0000
+
+signon-ui (0.17+14.10.20140814-0ubuntu1) utopic; urgency=low
+
+  [ Ubuntu daily release ]
+  * New rebuild forced
+
+  [ Alberto Mardegan ]
+  * New release Add signon-ui-service, to fix co-installation with u-s-
+    s-o-a. Use Oxide instead of WebKit2 .
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Thu, 14 Aug 2014 10:23:08 +0000
+
+signon-ui (0.17+14.10.20140612-0ubuntu1) utopic; urgency=medium
+
+  [ Alberto Mardegan ]
+  * Use Oxide instead of WebKit2
+  * Add signon-ui-service, to fix co-installation with u-s-s-o-a
+
+  [ Ubuntu daily release ]
+  * New rebuild forced
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Thu, 12 Jun 2014 13:35:05 +0000
+
+signon-ui (0.16+14.10.20140530-0ubuntu1) utopic; urgency=low
+
+  [ Timo Jyrinki ]
+  * Depend on libqt5sensors5-dev instead of qtsensors5-dev. (LP:
+    #1317885) (LP: #1317885)
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Fri, 30 May 2014 17:38:39 +0000
+
+signon-ui (0.16+14.04.20140304.is.0.15+14.04.20140313-0ubuntu2) utopic; urgency=medium
+
+  * debian/control: remove arch constraints in gl/gles build-deps, not needed
+    as it follows what Qt uses
+
+ -- Ricardo Salveti de Araujo <ricardo.salveti at canonical.com>  Tue, 29 Apr 2014 10:57:43 -0700
+
+signon-ui (0.16+14.04.20140304.is.0.15+14.04.20140313-0ubuntu1) trusty; urgency=low
+
+  * New rebuild forced
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Thu, 13 Mar 2014 15:22:16 +0000
+
+signon-ui (0.16+14.04.20140304.is.0.15+14.04.20131024.2-0ubuntu1) trusty; urgency=medium
+
+  * Reverting as desktop image isn't installable (main/universe
+    mismatch) and causing all signon-ui tests on Touch failing
+
+ -- Didier Roche <didrocks at ubuntu.com>  Wed, 05 Mar 2014 12:19:29 +0100
+
+signon-ui (0.16+14.04.20140304-0ubuntu1) trusty; urgency=medium
+
+  [ Alberto Mardegan ]
+  * Tag version 0.16.
+  * Add an experimental method to get the WebView cookies This is
+    intended to be used by the webapps container, in the attempt to
+    reduce the number of web logins required to the user.
+  * Disable failing test on QtDBus Q_ASSERT See https://bugreports.qt-
+    project.org/browse/QTBUG-36475 . (LP: #1271052)
+
+  [ Alexandre Abreu ]
+  * Update UA overrides from the most recent ones .
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Tue, 04 Mar 2014 15:04:01 +0000
+
+signon-ui (0.15+14.04.20131024.2-0ubuntu1) trusty; urgency=low
+
+  [ Ken VanDine ]
+  * Don't limit arch to a fixed set (LP: #1239743) . (LP: #1239743)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 119
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Thu, 24 Oct 2013 20:30:36 +0000
+
+signon-ui (0.15+13.10.20131016.2-0ubuntu1) saucy; urgency=low
+
+  [ Alberto Mardegan ]
+  * Do not anchor to the osk item (OnScreenKeyboard), as it's not a
+    sibling. . (LP: #1238485)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 117
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Wed, 16 Oct 2013 14:15:21 +0000
+
+signon-ui (0.15+13.10.20131011-0ubuntu1) saucy; urgency=low
+
+  [ Ken VanDine ]
+  * Use a MainView and pull in the UserAgent logic used in the Browser
+    component. Using the correct useragent fixes things like facebook
+    suggesting users should install the facebook app for iphone (LP:
+    #1235259). (LP: #1235259)
+  * Allow overriding the QML files used by placing them in
+    /usr/share/signon-ui/qml If there is a webview.qml file in that
+    directory, load it instead of using the one built into the
+    resources. This is useful for debugging QML only changes on the
+    device without needing to rebuild and install signon-ui. It is
+    important to note, when overriding them you need to copy include the
+    .qml and .js files into that directory. .
+
+  [ Iain Lane ]
+  * Allow LIBDIR and LIBEXECDIR to be overridden; install in multiarch
+    path; set LIBEXECDIR=LIBDIR .
+
+  [ Alberto Mardegan ]
+  * Bump build dependency for XEmbed support .
+  * Allow the request to be cancelled from the UI. Clients can provide a
+    QML component to be used in order to create the authentication page,
+    and this gives them a way to add a cancel button there. (LP:
+    #1231691)
+  * Let the client override the Page component. . (LP: #1231691)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 115
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Fri, 11 Oct 2013 04:33:07 +0000
+
+signon-ui (0.15+13.10.20131003.1-0ubuntu1) saucy; urgency=low
+
+  [ Alberto Mardegan ]
+  * Add missing import line The lack of this line was causing the
+    "units.gu()" function to be undefined, and therefore the form factor
+    was undefined as well, and consequently also the user-agent. . (LP:
+    #1217792)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 108
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Thu, 03 Oct 2013 16:36:31 +0000
+
+signon-ui (0.15daily13.06.25-0ubuntu1) saucy; urgency=low
+
+  [ Alberto Mardegan ]
+  * Show a warning message when authenticating with plain
+    HTTP. (LP: #1180297).
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 106
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Tue, 25 Jun 2013 04:31:06 +0000
+
+signon-ui (0.15daily13.06.12-0ubuntu1) saucy; urgency=low
+
+  [ Alberto Mardegan ]
+  * Don't block the "about:blank" URL.
+  * Don't empty the username field when the login form is re-presented.
+  * Do not hardcode the prefix in D-Bus service files.
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 104
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Wed, 12 Jun 2013 04:31:57 +0000
+
+signon-ui (0.14daily13.06.05.1-0ubuntu1) saucy; urgency=low
+
+  [ phablet ]
+  * Add some more logic for the webview, based on Ubuntu.Browser for better
+    support on phablet
+
+  [ Ken VanDine ]
+  * Optionally use WebKit2 in Qt5 Add a configuration option ("qmake
+    CONFIG+=no-widgets") to disable using the QtWidgets based QWebView
+    and use QtQuick's WebView, which is based on WebKit2. Another
+    configuration option ("CONFIG+=force-foreign-qwindow") can be used
+    to enable window embedding/reparenting with Qt5, which otherwise
+    would only be enabled with Qt 5.1 or later. Note that the "no-
+    widgets" option is not activated in debian/rules; that bit should go
+    into a separate branch. The WebView implementation is mostly based
+    on Ken Vandine's "phablet-rebased" branch; the big difference here
+    is that the WebView is opened in a separate process, which is
+    spawned by signon-ui with a hacked $HOME variable which will force
+    WebKit2 to store all its data (cookies and form completions) into a
+    different location depending on the identity being authenticated.
+    The process separation is needed in order not to share the same
+    WebKit's WebProcess among the WebViews, which would defeat the trick
+    of changing $HOME.
+
+  [ Alberto Mardegan ]
+  * Use bzr-export to implement the "make dist" command This includes
+    the po/Makefile file, which was previously being excluded by
+    mistake. . (LP: #1162296)
+  * Wait 3 seconds before reporting a page load failure When logging in
+    to Google with an Ubuntu SSO account, the browser is briefly
+    redirected to a page which fails to load; however, the
+    authentication then continues successfully. In order not to stop the
+    authentication process, wait three seconds before terminating the
+    authentication with an error, and abort the timer if another URL is
+    queued. . (LP: #1171853)
+  * Cancel fail timer when a load is in progress If a page is loading,
+    don't make the request fail. . (LP: #1171853)
+  * Implement removeIdentityData signond will call this method when an
+    identity is removed or being signed out. .
+  * Optionally use WebKit2 in Qt5 Add a configuration option ("qmake
+    CONFIG+=no-widgets") to disable using the QtWidgets based QWebView
+    and use QtQuick's WebView, which is based on WebKit2. Another
+    configuration option ("CONFIG+=force-foreign-qwindow") can be used
+    to enable window embedding/reparenting with Qt5, which otherwise
+    would only be enabled with Qt 5.1 or later. Note that the "no-
+    widgets" option is not activated in debian/rules; that bit should go
+    into a separate branch. The WebView implementation is mostly based
+    on Ken Vandine's "phablet-rebased" branch; the big difference here
+    is that the WebView is opened in a separate process, which is
+    spawned by signon-ui with a hacked $HOME variable which will force
+    WebKit2 to store all its data (cookies and form completions) into a
+    different location depending on the identity being authenticated.
+    The process separation is needed in order not to share the same
+    WebKit's WebProcess among the WebViews, which would defeat the trick
+    of changing $HOME.
+  * Runtime detection of browser handler Even if the "use-webkit2"
+    option is given at build time, allow using the qtwebkit1 interface
+    on xcb. This allows us to use the same signon-ui binary for desktop
+    and phone form factors. .
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 100
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Wed, 05 Jun 2013 18:49:08 +0000
+
+signon-ui (0.14daily13.05.14ubuntu.unity.next-0ubuntu1) raring; urgency=low
+
+  [ Alberto Mardegan ]
+  * Add a flag to disable SSL errors (to be used for integration tests).
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 97 (ubuntu-unity/next)
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Tue, 14 May 2013 13:50:47 +0000
+
+signon-ui (0.14daily13.05.02.1ubuntu.unity.next-0ubuntu1) raring; urgency=low
+
+  * Automatic snapshot from revision 95 (ubuntu-unity/next)
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Thu, 02 May 2013 20:48:13 +0000
+
+signon-ui (0.14daily13.05.02ubuntu.unity.next-0ubuntu1) raring; urgency=low
+
+  * Automatic snapshot from revision 92 (ubuntu-unity/next)
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Thu, 02 May 2013 07:36:29 +0000
+
+signon-ui (0.14daily13.05.01.1ubuntu.unity.next-0ubuntu2) UNRELEASED; urgency=low
+
+  * debian/control
+    - don't build for powerpc, qtsensors5-dev isn't available
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Thu, 02 May 2013 01:16:37 -0700
+
+signon-ui (0.14daily13.05.01.1ubuntu.unity.next-0ubuntu1) raring; urgency=low
+
+  [ Alberto Mardegan ]
+  * Fix a crash potentially happening when the XEmbed container reused the
+    same X window ID from a previous one.
+
+  [ Ken VanDine ]
+  * Automatic snapshot from revision 84 (bootstrap)
+
+  [ Alberto Mardegan ]
+  * po/Makefile is missing from released tarballs (LP: #1162296)
+  * Cannot log in to Google apps domain + Ubuntu SSO (LP: #1171853)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 90 (ubuntu-unity/next)
+
+ -- Ubuntu daily release <ps-jenkins at lists.canonical.com>  Wed, 01 May 2013 07:53:33 +0000
+
+signon-ui (0.14-0ubuntu2) saucy; urgency=low
+
+  [ Alberto Mardegan ]
+  * Fix a crash potentially happening when the XEmbed container reused the
+    same X window ID from a previous one. (LP: #1158969)
+  * Fixed Cannot log in to Google apps domain + Ubuntu SSO (LP: #1171853)
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Wed, 29 May 2013 10:37:43 -0400
+
+signon-ui (0.14-0ubuntu1) raring; urgency=low
+
+  * New upstream release.
+    - Fix page scrolling for some websites (LP: #1158173)
+    - Prevent a double deletion of the browser dialog (LP: #1111507)
+    - Tests: don't use any libnotify methods.
+
+ -- Alberto Mardegan <alberto.mardegan at canonical.com>  Thu, 21 Mar 2013 14:46:48 +0200
+
+signon-ui (0.13bzr13.03.19-0ubuntu1) raring; urgency=low
+
+  * Do not quit if some accounts are failing (LP: #1135038)
+  * Default daemonTimeout to 30 (LP: #1112680)
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Tue, 19 Mar 2013 11:17:02 -0400
+
+signon-ui (0.12bzr13.01.09-0ubuntu1) raring; urgency=low
+
+  * Inline packaging metadata.
+  * Fix typo in proxy detection algorithm (LP: #1095254) [mardy]
+  * Tests: add functional test for the reauthenticator [mardy]
+
+ -- Robert Bruce Park <robert.park at canonical.com>  Wed, 09 Jan 2013 14:55:15 -0800
+
+signon-ui (0.11-0ubuntu1) quantal-proposed; urgency=low
+
+  * New upstream release.
+    - Do not instantiate invalid QDBusMessages (LP: #1040580)
+    - Do not allocate the proxy factory on the
+      stack (LP: #1053444) (LP: #1053454)
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Tue, 25 Sep 2012 16:47:07 -0400
+
+signon-ui (0.10-0ubuntu1) quantal; urgency=low
+
+  * New upstream release.
+    - Fixed proxy support (LP: #1048590)
+    - Don't emit an OSD notification when accounts fail to
+      authenticate (LP: #1049140)
+  * debian/control
+    - build depend on libproxy-dev
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Wed, 19 Sep 2012 15:06:38 -0400
+
+signon-ui (0.9-0ubuntu1) quantal; urgency=low
+
+  * New upstream release.
+    - Early terminate successful requests with no UI (LP: #1049207)
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Wed, 12 Sep 2012 09:36:58 -0400
+
+signon-ui (0.8-0ubuntu1) quantal; urgency=low
+
+  * New upstream release.
+    - Successfully terminate the browser request as soon as we are requested
+      to load the final URL.  This fixes spawning a bunch of instances of
+      external browser instances (LP: #1048177) (LP: #1047588)
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Mon, 10 Sep 2012 09:08:27 -0400
+
+signon-ui (0.7-0ubuntu1) quantal; urgency=low
+
+  * New upstream release.
+    - protect webkit from untrusted content, only allow https (LP: #1039084)
+  * -debian/patches/unit_tests_only.patch, merged upstream
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Fri, 07 Sep 2012 09:33:56 -0400
+
+signon-ui (0.6-0ubuntu1) quantal; urgency=low
+
+  * New upstream release.
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Fri, 17 Aug 2012 16:53:56 -0400
+
+signon-ui (0.5-0ubuntu1) quantal; urgency=low
+
+  * New upstream release
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Thu, 02 Aug 2012 14:40:56 -0400
+
+signon-ui (0.4+bzr47-0quantal1) quantal; urgency=low
+
+  * New snapshot rev 47
+  * common-project-config.pri
+    - fixed FTBFS by including X11 in pkgconfg
+  * tests/test.pro
+    - Only run unit tests
+  * debian/control
+    - added build depends for libxext-dev, gdb, xvfb, dbus-test-runner
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Wed, 01 Aug 2012 17:03:13 -0400
+
+signon-ui (0.4+bzr46-0quantal1) quantal; urgency=low
+
+  * rebuild for quantal
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Mon, 16 Jul 2012 09:59:56 -0400
+
+signon-ui (0.4+bzr46-0precise2) precise; urgency=low
+
+  * no change rebuild
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Fri, 15 Jun 2012 16:53:26 -0400
+
+signon-ui (0.4+bzr46-0precise1) precise; urgency=low
+
+  * new snapshot tag 0.4+bzr46
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Fri, 01 Jun 2012 14:43:03 -0400
+
+signon-ui (0.3+bzr43-0precise1) precise; urgency=low
+
+  * new snapshot tag 0.3+bzr43
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Wed, 04 Apr 2012 15:03:37 -0400
+
+signon-ui (0.3+bzr34-0precise2) precise; urgency=low
+
+  * rebased on trunk
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Fri, 30 Mar 2012 12:01:03 -0400
+
+signon-ui (0.3+bzr34-0precise1) precise; urgency=low
+
+  * new snapshot tag 0.3+bzr40
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Thu, 29 Mar 2012 14:34:00 -0400
+
+signon-ui (0.2+bzr37-0precise1) precise; urgency=low
+
+  * New snapshot r37
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Mon, 19 Mar 2012 12:27:12 -0400
+
+signon-ui (0.2-0precise2) precise; urgency=low
+
+  * debian/control
+    - added build depends on libx11-dev
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Thu, 05 Jan 2012 12:55:17 -0500
+
+signon-ui (0.2-0precise1) precise; urgency=low
+
+  * Initial release
+
+ -- Ken VanDine <ken.vandine at canonical.com>  Thu, 05 Jan 2012 10:32:27 -0500
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..9b8da18
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,39 @@
+Source: signon-ui
+Section: gnome
+Priority: optional
+Maintainer: Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>
+Uploaders: Diane Trout <diane at debian.org>
+Build-Depends: dbus-test-runner,
+               debhelper-compat (= 13),
+               libaccounts-qt5-dev,
+               libnotify-dev,
+               libproxy-dev,
+               libqt5webkit5-dev,
+               libsignon-qt5-dev,
+               libx11-dev,
+               pkg-config,
+               qtbase5-dev (>= 5.0.2+dfsg1),
+               qtdeclarative5-dev,
+               signon-plugins-dev,
+               xvfb,
+               xauth,
+Standards-Version: 4.5.1
+Homepage: https://launchpad.net/signon-ui
+Rules-Requires-Root: no
+Vcs-Browser: https://salsa.debian.org/qt-kde-team/extras/signon-ui
+Vcs-Git: https://salsa.debian.org/qt-kde-team/extras/signon-ui.git
+
+Package: signon-ui-x11
+Architecture: any
+Depends: ${misc:Depends},
+         ${shlibs:Depends},
+         signon-ui-service
+Description: Single Sign-on UI
+ UI for the signond Single Signon service
+
+Package: signon-ui-service
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Description: D-Bus service file for signon-ui
+ This D-Bus service is used to provide a UI for authenticating online accounts.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..0fe312d
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,56 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: signon-ui
+Upstream-Contact: Alberto Mardegan <alberto.mardegan at canonical.com>
+Source: https://launchpad.net/online-accounts-signon-ui
+
+Files: *
+Copyright: 2011-2014 Canonical Ltd
+           2009, Nokia Corporation
+License: GPL-3
+
+Files: src/my-network-proxy-factory.cpp
+Copyright: 2012, Nokia Corporation and/or its subsidiary(-ies)
+License: GPL-3 or LGPL-2.1-QTexception-1.1
+
+Files: debian/*
+Copyright: 2011 Ken VanDine <ken.vandine at canonical.com>
+           2015 Diane Trout <diane at debian.org>
+License: GPL-3
+
+License: GPL-3
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License version 3, as published
+ by the Free Software Foundation.
+ .
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranties of
+ MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+ PURPOSE.  See the GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program.  If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General Public License
+ version 3 can be found in `/usr/share/common-licenses/GPL-3'.
+
+License: LGPL-2.1-QTexception-1.1
+ As an additional permission to the GNU Lesser General Public License version
+ 2.1, the object code form of a "work that uses the Library" may incorporate
+ material from a header file that is part of the Library.  You may distribute
+ such object code under terms of your choice, provided that:
+     (i)   the header files of the Library have not been modified; and
+     (ii)  the incorporated material is limited to numerical parameters, data
+           structure layouts, accessors, macros, inline functions and
+           templates; and
+     (iii) you comply with the terms of Section 6 of the GNU Lesser General
+           Public License version 2.1.
+ .
+ Moreover, you may apply this exception to a modified version of the Library,
+ provided that such modification does not involve copying material from the
+ Library into the modified Library's header files unless such material is
+ limited to (i) numerical parameters; (ii) data structure layouts;
+ (iii) accessors; and (iv) small macros, templates and inline functions of
+ five lines or less in length.
+ .
+ Furthermore, you are not required to apply this additional permission to a
+ modified version of the Library.
diff --git a/debian/patches/0001_gitlab_tag_0.17+15.10.20150810-0ubuntu1.diff b/debian/patches/0001_gitlab_tag_0.17+15.10.20150810-0ubuntu1.diff
new file mode 100644
index 0000000..34d175e
--- /dev/null
+++ b/debian/patches/0001_gitlab_tag_0.17+15.10.20150810-0ubuntu1.diff
@@ -0,0 +1,2601 @@
+diff -U 3 -H -d -r -N -- a/src/.gitignore b/src/.gitignore
+--- a/src/.gitignore	1970-01-01 10:00:00.000000000 +1000
++++ b/src/.gitignore	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,6 @@
++com.canonical.indicators.webcredentials.service
++com.nokia.singlesignonui.service
++signon-ui
++signon-ui.desktop
++webcredentials_adaptor.cpp
++webcredentials_adaptor.h
+diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
+--- a/src/browser-request.cpp	2015-11-26 02:34:08.000000000 +1000
++++ b/src/browser-request.cpp	2023-09-18 07:38:06.271073010 +1000
+@@ -1,7 +1,8 @@
+ /*
+  * This file is part of signon-ui
+  *
+- * Copyright (C) 2011 Canonical Ltd.
++ * Copyright (C) 2013 Canonical Ltd.
++ * Copyright (C) 2017 Alberto Mardegan
+  *
+  * Contact: Alberto Mardegan <alberto.mardegan at canonical.com>
+  *
+@@ -20,302 +21,73 @@
+
+ #include "browser-request.h"
+
+-#include "animation-label.h"
+-#include "cookie-jar-manager.h"
+ #include "debug.h"
+-#include "dialog.h"
+-#include "http-warning.h"
++#include "qquick-dialog.h"
++#include "errors.h"
+ #include "i18n.h"
+
+-#include <QDBusArgument>
+-#include <QDesktopServices>
+-#include <QIcon>
+-#include <QLabel>
+-#include <QNetworkCookie>
+-#include <QNetworkReply>
+-#include <QNetworkRequest>
+-#include <QPixmap>
+-#include <QPointer>
+-#include <QProgressBar>
+-#include <QPushButton>
+-#include <QRegExp>
+-#include <QSettings>
+-#include <QSslError>
+-#include <QStackedLayout>
+-#include <QStatusBar>
++#include <QDir>
++#include <QQmlContext>
++#include <QStandardPaths>
+ #include <QTimer>
+-#include <QVBoxLayout>
+-#include <QWebElement>
+-#include <QWebFrame>
+-#include <QWebView>
+ #include <SignOn/uisessiondata_priv.h>
+
+ using namespace SignOnUi;
++using namespace SignOnUi::QQuick;
+
+ namespace SignOnUi {
+
+-static const QString keyPreferredWidth = QString("PreferredWidth");
+-static const QString keyHorizontalScrollBar = QString("HorizontalScrollBar");
+-static const QString keyVerticalScrollBar = QString("VerticalScrollBar");
+-static const QString keyTextSizeMultiplier = QString("TextSizeMultiplier");
+-static const QString keyUserAgent = QString("UserAgent");
+-static const QString keyViewportWidth = QString("ViewportWidth");
+-static const QString keyViewportHeight = QString("ViewportHeight");
+-static const QString keyZoomFactor = QString("ZoomFactor");
+-static const QString keyUsernameField = QString("UsernameField");
+-static const QString keyPasswordField = QString("PasswordField");
+-static const QString keyLoginButton = QString("LoginButton");
+-static const QString keyInternalLinksPattern = QString("InternalLinksPattern");
+-static const QString keyExternalLinksPattern = QString("ExternalLinksPattern");
+-static const QString keyAllowedUrls = QString("AllowedUrls");
+-static const QString valueAlwaysOn = QString("alwaysOn");
+-static const QString valueAlwaysOff = QString("alwaysOff");
+-
+-/* Additional session-data keys we support. */
+-static const QString keyCookies = QString("Cookies");
+-static const QString keyAllowedSchemes = QString("AllowedSchemes");
+-static const QString keyIgnoreSslErrors = QString("IgnoreSslErrors");
+-
+-static bool pathsAreEqual(const QString &p1, const QString &p2)
+-{
+-    static QRegExp regExp("/*$");
+-    QString p1copy(p1);
+-    QString p2copy(p2);
+-    return p1copy.remove(regExp) == p2copy.remove(regExp);
+-}
+-
+-class WebPage: public QWebPage
+-{
+-    Q_OBJECT
+-
+-public:
+-    WebPage(QObject *parent = 0): QWebPage(parent) {}
+-    ~WebPage() {}
+-
+-    void setUserAgent(const QString &userAgent) { m_userAgent = userAgent; }
+-
+-    void setExternalLinksPattern(const QString &pattern) {
+-        m_externalLinksPattern =
+-            QRegExp(pattern, Qt::CaseInsensitive, QRegExp::RegExp2);
+-    }
+-
+-    void setInternalLinksPattern(const QString &pattern) {
+-        m_internalLinksPattern =
+-            QRegExp(pattern, Qt::CaseInsensitive, QRegExp::RegExp2);
+-    }
+-
+-    void setAllowedSchemes(const QStringList &schemes) {
+-        m_allowedSchemes = schemes;
+-    }
+-
+-    void setAllowedUrls(const QString &pattern) {
+-        m_allowedUrls =
+-            QRegExp(pattern, Qt::CaseInsensitive, QRegExp::RegExp2);
+-    }
+-
+-    void setFinalUrl(const QUrl &url) { m_finalUrl = url; }
+-
+-protected:
+-    // reimplemented virtual methods
+-    QString userAgentForUrl(const QUrl &url) const
+-    {
+-        return m_userAgent.isEmpty() ?
+-            QWebPage::userAgentForUrl(url) : m_userAgent;
+-    }
+-
+-    bool acceptNavigationRequest(QWebFrame *frame,
+-                                 const QNetworkRequest &request,
+-                                 NavigationType type)
+-    {
+-        Q_UNUSED(type);
+-
+-        QUrl url = request.url();
+-        TRACE() << url;
+-
+-        /* We generally don't need to load the final URL, so skip loading it.
+-         * If this behaviour is not desired for some requests, then just avoid
+-         * calling setFinalUrl() */
+-        if (url.host() == m_finalUrl.host() &&
+-            pathsAreEqual(url.path(), m_finalUrl.path())) {
+-            Q_EMIT finalUrlReached(url);
+-            return false;
+-        }
+-
+-        /* open all new window requests (identified by "frame == 0") in the
+-         * external browser, as well as other links according to the
+-         * ExternalLinksPattern and InternalLinksPattern rules. */
+-        if (frame == 0 || urlIsBlocked(url)) {
+-            QDesktopServices::openUrl(url);
+-            return false;
+-        }
+-        /* Handle all other requests internally. */
+-        return true;
+-    }
+-
+-Q_SIGNALS:
+-    void finalUrlReached(const QUrl &url);
+-
+-private:
+-    bool urlIsBlocked(QUrl url) const;
+-
+-private:
+-    QString m_userAgent;
+-    QRegExp m_externalLinksPattern;
+-    QRegExp m_internalLinksPattern;
+-    QStringList m_allowedSchemes;
+-    QRegExp m_allowedUrls;
+-    QUrl m_finalUrl;
+-};
+-
+-bool WebPage::urlIsBlocked(QUrl url) const {
+-    if (url == QUrl("about:blank")) return false;
+-
+-    if (!m_allowedSchemes.contains(url.scheme())) {
+-        TRACE() << "Scheme not allowed:" << url.scheme();
+-        return true;
+-    }
+-
+-    if (!m_allowedUrls.isEmpty() &&
+-        !m_allowedUrls.exactMatch(url.toString())) {
+-        TRACE() << "URL not allowed:" << url;
+-        return true;
+-    }
+-
+-    QString urlText = url.toString(QUrl::RemoveScheme |
+-                                   QUrl::RemoveUserInfo |
+-                                   QUrl::RemoveFragment |
+-                                   QUrl::StripTrailingSlash);
+-    if (urlText.startsWith("//")) {
+-        urlText = urlText.mid(2);
+-    }
+-
+-    if (!m_internalLinksPattern.isEmpty()) {
+-        return !m_internalLinksPattern.exactMatch(urlText);
+-    }
+-
+-    if (!m_externalLinksPattern.isEmpty()) {
+-        return m_externalLinksPattern.exactMatch(urlText);
+-    }
+-
+-    return false;
+-}
+-
+-class WebView: public QWebView
+-{
+-    Q_OBJECT
+-
+-public:
+-    WebView(QWidget *parent = 0):
+-        QWebView(parent)
+-    {
+-        setSizePolicy(QSizePolicy::MinimumExpanding,
+-                      QSizePolicy::MinimumExpanding);
+-        setAttribute(Qt::WA_OpaquePaintEvent, true);
+-    }
+-    ~WebView() {};
+-
+-    void setPreferredSize(const QSize &size) {
+-        m_preferredSize = size;
+-        updateGeometry();
+-    }
+-
+-protected:
+-    QSize sizeHint() const {
+-        if (m_preferredSize.isValid()) {
+-            return m_preferredSize;
+-        } else {
+-            return QSize(400, 300);
+-        }
+-    }
+-
+-    void paintEvent(QPaintEvent *event) {
+-        QPainter painter(this);
+-        painter.fillRect(rect(), palette().window());
+-        QWebView::paintEvent(event);
+-    }
+-
+-private:
+-    QSize m_preferredSize;
+-};
+-
+ class BrowserRequestPrivate: public QObject
+ {
+     Q_OBJECT
+     Q_DECLARE_PUBLIC(BrowserRequest)
++    Q_PROPERTY(QUrl pageComponentUrl READ pageComponentUrl CONSTANT)
++    Q_PROPERTY(QUrl currentUrl READ currentUrl WRITE setCurrentUrl)
++    Q_PROPERTY(QUrl startUrl READ startUrl CONSTANT)
++    Q_PROPERTY(QUrl finalUrl READ finalUrl CONSTANT)
+
+ public:
+     BrowserRequestPrivate(BrowserRequest *request);
+     ~BrowserRequestPrivate();
+
+-    QWidget *buildWebViewPage(const QVariantMap &params);
+-    QWidget *buildSuccessPage();
+-    QWidget *buildLoadFailurePage();
+-    void buildDialog(const QVariantMap &params);
+     void start();
+
+-private Q_SLOTS:
+-    void onSslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
+-    void onUrlChanged(const QUrl &url);
+-    void onLoadProgress();
++    void setCurrentUrl(const QUrl &url);
++    QUrl pageComponentUrl() const;
++    QUrl currentUrl() const { return m_currentUrl; }
++    QUrl startUrl() const { return m_startUrl; }
++    QUrl finalUrl() const { return m_finalUrl; }
++    QUrl responseUrl() const { return m_responseUrl; }
++
++public Q_SLOTS:
++    void cancel();
++    void onLoadStarted();
+     void onLoadFinished(bool ok);
++
++private Q_SLOTS:
+     void onFailTimer();
+     void onFinished();
+-    void startProgress();
+-    void stopProgress();
+-    void onContentsChanged();
+
+ private:
+-    void showDialog();
+-    void setupViewForUrl(const QUrl &url);
+-    void notifyAuthCompleted();
+-    void notifyLoadFailed();
+-    QWebElement initializeField(const QString &settingsKey,
+-                                const QString &paramKey = QString());
+-    void initializeFields();
+-    bool tryAutoLogin();
+-    void addBrowserCookies(CookieJar *cookieJar);
++    void buildDialog(const QVariantMap &params);
+
+ private:
+-    mutable BrowserRequest *q_ptr;
+-    /* The dialog can be deleted by the Request class, if it's set as children
+-     * of an embedded widget which is then deleted. Therefore, in order to
+-     * avoid a double deletion, guard the pointer with a QPointer. */
+-    QPointer<Dialog> m_dialog;
+-    QStackedLayout *m_dialogLayout;
+-    QWidget *m_webViewPage;
+-    QWidget *m_successPage;
+-    QWidget *m_loadFailurePage;
+-    QStackedLayout *m_webViewLayout;
+-    WebView *m_webView;
+-    AnimationLabel *m_animationLabel;
+-    HttpWarning *m_httpWarning;
+-    QUrl finalUrl;
+-    QUrl responseUrl;
+-    QString m_host;
+-    QSettings *m_settings;
+-    QWebElement m_usernameField;
+-    QWebElement m_passwordField;
+-    QWebElement m_loginButton;
+-    QString m_username;
+-    QString m_password;
+-    int m_loginCount;
+-    bool m_ignoreSslErrors;
++    Dialog *m_dialog;
++    QUrl m_currentUrl;
++    QUrl m_startUrl;
++    QUrl m_finalUrl;
++    QUrl m_responseUrl;
+     QTimer m_failTimer;
++    mutable BrowserRequest *q_ptr;
+ };
+
+ } // namespace
+
+-BrowserRequestPrivate::BrowserRequestPrivate(BrowserRequest *request):
++BrowserRequestPrivate::BrowserRequestPrivate(
++    BrowserRequest *request):
+     QObject(request),
+-    q_ptr(request),
+     m_dialog(0),
+-    m_webViewLayout(0),
+-    m_webView(0),
+-    m_animationLabel(0),
+-    m_httpWarning(0),
+-    m_settings(0),
+-    m_loginCount(0),
+-    m_ignoreSslErrors(false)
++    q_ptr(request)
+ {
+     m_failTimer.setSingleShot(true);
+     m_failTimer.setInterval(3000);
+@@ -328,45 +100,99 @@
+     delete m_dialog;
+ }
+
+-void BrowserRequestPrivate::onSslErrors(QNetworkReply *reply,
+-                                        const QList<QSslError> &errors)
++void BrowserRequestPrivate::start()
+ {
+-    TRACE() << errors;
+-    if (m_ignoreSslErrors) {
+-        reply->ignoreSslErrors();
++    Q_Q(BrowserRequest);
++
++    const QVariantMap &params = q->parameters();
++    TRACE() << params;
++
++    QString cachePath =
++        QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
++    QDir rootDir = cachePath + QString("/id-%1").arg(q->identity());
++    if (!rootDir.exists()) {
++        rootDir.mkpath(".");
+     }
++
++    m_finalUrl = params.value(SSOUI_KEY_FINALURL).toString();
++    m_startUrl = params.value(SSOUI_KEY_OPENURL).toString();
++    buildDialog(params);
++
++    QObject::connect(m_dialog, SIGNAL(finished(int)),
++                     this, SLOT(onFinished()));
++
++    QUrl webview("qrc:/MainWindow.qml");
++    QDir qmlDir("/usr/share/signon-ui/qml");
++    if (qmlDir.exists())
++    {
++        QFileInfo qmlFile(qmlDir.absolutePath() + "/MainWindow.qml");
++        if (qmlFile.exists())
++            webview.setUrl(qmlFile.absoluteFilePath());
++    }
++
++    m_dialog->rootContext()->setContextProperty("request", this);
++    m_dialog->rootContext()->setContextProperty("rootDir",
++                                                QUrl::fromLocalFile(rootDir.absolutePath()));
++    m_dialog->setSource(webview);
+ }
+
+-void BrowserRequestPrivate::onUrlChanged(const QUrl &url)
++QUrl BrowserRequestPrivate::pageComponentUrl() const
+ {
+-    Q_Q(BrowserRequest);
++    Q_Q(const BrowserRequest);
++    /* We define the X-PageComponent key to let the clients override the QML
++     * component to be used to build the authentication page.
++     * To prevent a malicious client to show it's own UI, we require that the
++     * file path begins with "/usr/share/signon-ui/" (where Ubuntu click
++     * packages cannot install files).
++     */
++    QUrl providedUrl = q->clientData().value("X-PageComponent").toString();
++    if (providedUrl.isValid() && providedUrl.isLocalFile() &&
++        providedUrl.path().startsWith("/usr/share/signon-ui/")) {
++        return providedUrl;
++    } else {
++        return QStringLiteral("DefaultPage.qml");
++    }
++}
+
++void BrowserRequestPrivate::setCurrentUrl(const QUrl &url)
++{
+     TRACE() << "Url changed:" << url;
+     m_failTimer.stop();
+
+-    if (url.host() == finalUrl.host() &&
+-        pathsAreEqual(url.path(), finalUrl.path())) {
+-        responseUrl = url;
+-        if (q->embeddedUi() || !m_dialog->isVisible()) {
++    if (url.host() == m_finalUrl.host() &&
++        url.path() == m_finalUrl.path()) {
++        m_responseUrl = url;
++        if (!m_dialog->isVisible()) {
+             /* Do not show the notification page. */
+             m_dialog->accept();
+         } else {
+             /* Replace the web page with an information screen */
+-            notifyAuthCompleted();
++            /* TODO */
++            m_dialog->accept();
+         }
+     }
++}
+
+-    setupViewForUrl(url);
+-    m_httpWarning->setVisible(url.scheme() == "http");
++void BrowserRequestPrivate::cancel()
++{
++    Q_Q(BrowserRequest);
++
++    TRACE() << "Client requested to cancel";
++    q->setCanceled();
++    if (m_dialog) {
++        m_dialog->close();
++    }
+ }
+
+-void BrowserRequestPrivate::onLoadProgress()
++void BrowserRequestPrivate::onLoadStarted()
+ {
+     m_failTimer.stop();
+ }
+
+ void BrowserRequestPrivate::onLoadFinished(bool ok)
+ {
++    Q_Q(BrowserRequest);
++
+     TRACE() << "Load finished" << ok;
+
+     if (!ok) {
+@@ -374,17 +200,9 @@
+         return;
+     }
+
+-    if (loggingLevel() > 2) {
+-        /* Dump the HTML */
+-        TRACE() << m_webView->page()->mainFrame()->toHtml();
+-    }
+-
+-    initializeFields();
+-
+     if (!m_dialog->isVisible()) {
+-        if (responseUrl.isEmpty()) {
+-            if (!tryAutoLogin())
+-                showDialog();
++        if (m_responseUrl.isEmpty()) {
++            q->setWindow(m_dialog);
+         } else {
+             onFinished();
+         }
+@@ -393,166 +211,30 @@
+
+ void BrowserRequestPrivate::onFailTimer()
+ {
+-    notifyLoadFailed();
+-}
+-
+-void BrowserRequestPrivate::addBrowserCookies(CookieJar *cookieJar)
+-{
+     Q_Q(BrowserRequest);
+
+-    const QVariantMap &clientData = q->clientData();
+-    if (!clientData.contains(keyCookies)) return;
+-
+-    RawCookies rawCookies;
+-    QDBusArgument arg = clientData[keyCookies].value<QDBusArgument>();
+-    if (arg.currentSignature() == "a{sv}") {
+-        /* The signature of the argument should be "a{ss}", not "a{sv}";
+-         * however, ruby-dbus is rather primitive and there seems to be no way
+-         * to speficy a different signature than "a{sv}" when marshalling Hash
+-         * into a variant.
+-         * Therefore, just for our functional tests, also support "a{sv}".
+-         */
+-        QVariantMap cookieMap = qdbus_cast<QVariantMap>(arg);
+-        QVariantMap::const_iterator i;
+-        for (i = cookieMap.constBegin(); i != cookieMap.constEnd(); i++) {
+-            rawCookies.insert(i.key(), i.value().toString());
+-        }
+-    } else {
+-        rawCookies = qdbus_cast<RawCookies>(arg);
+-    }
+-
+-    QList<QNetworkCookie> cookies;
+-    RawCookies::const_iterator i;
+-    for (i = rawCookies.constBegin(); i != rawCookies.constEnd(); i++) {
+-        cookies.append(QNetworkCookie::parseCookies(i.value().toUtf8()));
++    TRACE() << "Page loading failed";
++    if (m_dialog) {
++        m_dialog->close();
+     }
+-
+-    TRACE() << "cookies:" << cookies;
+-    cookieJar->setCookies(cookies);
+-}
+-
+-void BrowserRequestPrivate::startProgress()
+-{
+-    m_animationLabel->start();
+-    m_webViewLayout->setCurrentIndex(1);
+-}
+-
+-void BrowserRequestPrivate::stopProgress()
+-{
+-    m_animationLabel->stop();
+-    m_webViewLayout->setCurrentIndex(0);
++    q->setResult(QVariantMap());
+ }
+
+-QWidget *BrowserRequestPrivate::buildWebViewPage(const QVariantMap &params)
++void BrowserRequestPrivate::onFinished()
+ {
+     Q_Q(BrowserRequest);
+
+-    QWidget *dialogPage = new QWidget;
+-    m_webViewLayout = new QStackedLayout(dialogPage);
+-
+-    m_webView = new WebView();
+-    WebPage *page = new WebPage(this);
+-    QObject::connect(page, SIGNAL(contentsChanged()),
+-                     this, SLOT(onContentsChanged()));
+-    QObject::connect(page->networkAccessManager(),
+-                     SIGNAL(sslErrors(QNetworkReply*,const QList<QSslError> &)),
+-                     this, SLOT(onSslErrors(QNetworkReply*,const QList<QSslError> &)));
+-    m_webView->setPage(page);
+-
+-    /* The following couple of lines serve to instruct the QWebPage not to load
+-     * the final URL, but to block it and emit the finalUrlReached() signal
+-     * instead.
+-     */
+-    page->setFinalUrl(finalUrl);
+-    QObject::connect(page, SIGNAL(finalUrlReached(const QUrl&)),
+-                     this, SLOT(onUrlChanged(const QUrl&)));
+-
+-    /* set a per-identity cookie jar on the page */
+-    uint identity = q->identity();
+-    CookieJarManager *cookieJarManager = CookieJarManager::instance();
+-    CookieJar *cookieJar = cookieJarManager->cookieJarForIdentity(identity);
+-    addBrowserCookies(cookieJar);
+-    page->networkAccessManager()->setCookieJar(cookieJar);
+-    /* NetworkAccessManager takes ownership of the cookieJar; we don't want
+-     * this */
+-    cookieJar->setParent(cookieJarManager);
+-
+-    const QVariantMap &clientData = q->clientData();
+-    if (clientData.contains(keyAllowedSchemes)) {
+-        page->setAllowedSchemes(clientData[keyAllowedSchemes].toStringList());
+-    } else {
+-        /* by default, allow only https */
+-        page->setAllowedSchemes(QStringList("https"));
+-    }
+-
+-    m_ignoreSslErrors = clientData.value(keyIgnoreSslErrors, false).toBool();
+-
+-    QUrl url(params.value(SSOUI_KEY_OPENURL).toString());
+-    setupViewForUrl(url);
+-    QObject::connect(m_webView, SIGNAL(urlChanged(const QUrl&)),
+-                     this, SLOT(onUrlChanged(const QUrl&)));
+-    QObject::connect(m_webView, SIGNAL(loadProgress(int)),
+-                     this, SLOT(onLoadProgress()));
+-    QObject::connect(m_webView, SIGNAL(loadFinished(bool)),
+-                     this, SLOT(onLoadFinished(bool)));
+-    QWidget *webViewContainer = new QWidget;
+-    QVBoxLayout *vLayout = new QVBoxLayout;
+-    vLayout->setSpacing(0);
+-    webViewContainer->setLayout(vLayout);
+-    vLayout->addWidget(m_webView);
+-
+-    m_httpWarning = new HttpWarning;
+-    m_httpWarning->setVisible(false);
+-    vLayout->addWidget(m_httpWarning);
+-
+-    m_webViewLayout->addWidget(webViewContainer);
+-
+-    m_animationLabel = new AnimationLabel(":/spinner-26.gif", 0);
+-    QObject::connect(m_webView, SIGNAL(loadStarted()),
+-                     this, SLOT(startProgress()));
+-    QObject::connect(m_webView, SIGNAL(loadFinished(bool)),
+-                     this, SLOT(stopProgress()));
+-    m_webViewLayout->addWidget(m_animationLabel);
+-    m_webView->setUrl(url);
+-
+-    return dialogPage;
+-}
+-
+-QWidget *BrowserRequestPrivate::buildSuccessPage()
+-{
+-    QWidget *dialogPage = new QWidget;
+-    dialogPage->setSizePolicy(QSizePolicy::Ignored,
+-                              QSizePolicy::MinimumExpanding);
+-    QVBoxLayout *layout = new QVBoxLayout(dialogPage);
+-
+-    QLabel *label = new QLabel(_("The authentication process is complete.\n"
+-                                 "You may now close this dialog "
+-                                 "and return to the application."));
+-    label->setAlignment(Qt::AlignCenter);
+-    layout->addWidget(label);
+-
+-    QPushButton *doneButton = new QPushButton(_("Done"));
+-    doneButton->setDefault(true);
+-    QObject::connect(doneButton, SIGNAL(clicked()),
+-                     m_dialog, SLOT(accept()));
+-    layout->addWidget(doneButton);
+-
+-    return dialogPage;
+-}
++    TRACE() << "Browser dialog closed";
++    QObject::disconnect(m_dialog, SIGNAL(finished(int)),
++                        this, SLOT(onFinished()));
+
+-QWidget *BrowserRequestPrivate::buildLoadFailurePage()
+-{
+-    QWidget *dialogPage = new QWidget;
+-    dialogPage->setSizePolicy(QSizePolicy::Ignored,
+-                              QSizePolicy::MinimumExpanding);
+-    QVBoxLayout *layout = new QVBoxLayout(dialogPage);
++    QVariantMap reply;
++    QUrl url = m_responseUrl.isEmpty() ? m_currentUrl : m_responseUrl;
++    reply[SSOUI_KEY_URLRESPONSE] = url.toString();
+
+-    QLabel *label = new QLabel(_("An error occurred while loading "
+-                                 "the authentication page."));
+-    label->setAlignment(Qt::AlignCenter);
+-    layout->addWidget(label);
++    m_dialog->close();
+
+-    return dialogPage;
++    q->setResult(reply);
+ }
+
+ void BrowserRequestPrivate::buildDialog(const QVariantMap &params)
+@@ -569,232 +251,15 @@
+         title = _("Web authentication");
+     }
+
+-    m_dialog->setWindowTitle(title);
+-
+-    m_dialogLayout = new QStackedLayout(m_dialog);
+-
+-    m_webViewPage = buildWebViewPage(params);
+-    m_dialogLayout->addWidget(m_webViewPage);
+-
+-    m_successPage = buildSuccessPage();
+-    m_dialogLayout->addWidget(m_successPage);
+-
+-    m_loadFailurePage = buildLoadFailurePage();
+-    m_dialogLayout->addWidget(m_loadFailurePage);
++    m_dialog->setTitle(title);
+
+     TRACE() << "Dialog was built";
+ }
+
+-void BrowserRequestPrivate::start()
+-{
+-    Q_Q(BrowserRequest);
+-
+-    finalUrl = QUrl(q->parameters().value(SSOUI_KEY_FINALURL).toString());
+-    buildDialog(q->parameters());
+-
+-    QObject::connect(m_dialog, SIGNAL(finished(int)),
+-                     this, SLOT(onFinished()));
+-
+-    if (q->embeddedUi()) {
+-        showDialog();
+-    }
+-}
+-
+-void BrowserRequestPrivate::onFinished()
+-{
+-    Q_Q(BrowserRequest);
+-
+-    TRACE() << "Browser dialog closed";
+-
+-    QObject::disconnect(m_webView, 0, this, 0);
+-
+-    QVariantMap reply;
+-    QUrl url = responseUrl.isEmpty() ? m_webView->url() : responseUrl;
+-    reply[SSOUI_KEY_URLRESPONSE] = url.toString();
+-
+-    if (!m_username.isEmpty())
+-        reply[SSOUI_KEY_USERNAME] = m_username;
+-    if (!m_password.isEmpty())
+-        reply[SSOUI_KEY_PASSWORD] = m_password;
+-
+-    q->setResult(reply);
+-}
+-
+-void BrowserRequestPrivate::onContentsChanged()
+-{
+-    /* See https://bugs.webkit.org/show_bug.cgi?id=32865 for the reason why
+-     * we are not simply calling m_usernameField.attribute("value")
+-     */
+-    if (!m_usernameField.isNull()) {
+-        m_username =
+-            m_usernameField.evaluateJavaScript("this.value").toString();
+-    }
+-    if (!m_passwordField.isNull()) {
+-        m_password =
+-            m_passwordField.evaluateJavaScript("this.value").toString();
+-    }
+-}
+-
+-void BrowserRequestPrivate::showDialog()
+-{
+-    Q_Q(BrowserRequest);
+-
+-    q->setWidget(m_dialog);
+-}
+-
+-static Qt::ScrollBarPolicy scrollPolicyFromValue(const QVariant &value)
+-{
+-    QString stringValue = value.toString();
+-    if (stringValue == valueAlwaysOn) {
+-        return Qt::ScrollBarAlwaysOn;
+-    } else if (stringValue == valueAlwaysOff) {
+-        return Qt::ScrollBarAlwaysOff;
+-    } else {
+-        return Qt::ScrollBarAsNeeded;
+-    }
+-}
+-
+-void BrowserRequestPrivate::setupViewForUrl(const QUrl &url)
+-{
+-    QString host = url.host();
+-    if (host == m_host) return;
+-
+-    m_host = host;
+-
+-    /* Load the host-specific configuration file */
+-    delete m_settings;
+-    m_settings = new QSettings("signon-ui/webkit-options.d/" + host, QString(), this);
+-
+-    WebPage *page = qobject_cast<WebPage *>(m_webView->page());
+-
+-    if (m_settings->contains(keyViewportWidth) &&
+-        m_settings->contains(keyViewportHeight)) {
+-        QSize viewportSize(m_settings->value(keyViewportWidth).toInt(),
+-                           m_settings->value(keyViewportHeight).toInt());
+-        m_webView->setPreferredSize(viewportSize);
+-    }
+-
+-    if (m_settings->contains(keyPreferredWidth)) {
+-        QSize preferredSize(m_settings->value(keyPreferredWidth).toInt(), 300);
+-        page->setPreferredContentsSize(preferredSize);
+-    }
+-
+-    if (m_settings->contains(keyTextSizeMultiplier)) {
+-        m_webView->setTextSizeMultiplier(m_settings->value(keyTextSizeMultiplier).
+-                                         toReal());
+-    }
+-
+-    if (m_settings->contains(keyUserAgent)) {
+-        page->setUserAgent(m_settings->value(keyUserAgent).toString());
+-    }
+-
+-    if (m_settings->contains(keyZoomFactor)) {
+-        m_webView->setZoomFactor(m_settings->value(keyZoomFactor).toReal());
+-    }
+-
+-    if (m_settings->contains(keyHorizontalScrollBar)) {
+-        Qt::ScrollBarPolicy policy =
+-            scrollPolicyFromValue(m_settings->value(keyHorizontalScrollBar));
+-        page->mainFrame()->setScrollBarPolicy(Qt::Horizontal, policy);
+-    }
+-
+-    if (m_settings->contains(keyVerticalScrollBar)) {
+-        Qt::ScrollBarPolicy policy =
+-            scrollPolicyFromValue(m_settings->value(keyVerticalScrollBar));
+-        page->mainFrame()->setScrollBarPolicy(Qt::Vertical, policy);
+-    }
+-
+-    page->setExternalLinksPattern(m_settings->value(keyExternalLinksPattern).
+-                                  toString());
+-    page->setInternalLinksPattern(m_settings->value(keyInternalLinksPattern).
+-                                  toString());
+-    page->setAllowedUrls(m_settings->value(keyAllowedUrls).toString());
+-}
+-
+-void BrowserRequestPrivate::notifyAuthCompleted()
+-{
+-    /* Ignore any webview signals from now on.
+-     * This is needed because QWebView might still emit loadFinished(false)
+-     * (which we would interpret as an error) on the final URL, which we don't
+-     * care about anymore. */
+-    QObject::disconnect(m_webView, 0, this, 0);
+-
+-    m_dialogLayout->setCurrentWidget(m_successPage);
+-}
+-
+-void BrowserRequestPrivate::notifyLoadFailed()
+-{
+-    m_dialogLayout->setCurrentWidget(m_loadFailurePage);
+-    showDialog();
+-}
+-
+-QWebElement BrowserRequestPrivate::initializeField(const QString &settingsKey,
+-                                                   const QString &paramKey)
+-{
+-    Q_Q(BrowserRequest);
+-
+-    QWebElement element;
+-
+-    if (!m_settings->contains(settingsKey)) return element;
+-
+-    QString selector = m_settings->value(settingsKey).toString();
+-    if (selector.isEmpty()) return element;
+-
+-    QWebFrame *frame = m_webView->page()->mainFrame();
+-    element = frame->findFirstElement(selector);
+-    if (!element.isNull()) {
+-        const QVariantMap &params = q->parameters();
+-        if (!paramKey.isEmpty() && params.contains(paramKey)) {
+-            QString value = params.value(paramKey).toString();
+-            if (!value.isEmpty()) {
+-                element.setAttribute("value", value);
+-            }
+-        }
+-    } else {
+-        BLAME() << "Couldn't find element:" << selector;
+-    }
+-
+-    return element;
+-}
+-
+-void BrowserRequestPrivate::initializeFields()
+-{
+-    /* If the configuration file contains a "UsernameField" or a
+-     * "PasswordField" key whose value is set to a valid CSS selector, we get
+-     * the QWebElement to these fields.
+-     * Also, if the username or password are present in the input parameters,
+-     * we prefill the respective fields.
+-     */
+-    m_usernameField = initializeField(keyUsernameField, SSOUI_KEY_USERNAME);
+-    m_passwordField = initializeField(keyPasswordField, SSOUI_KEY_PASSWORD);
+-    m_loginButton = initializeField(keyLoginButton);
+-}
+-
+-bool BrowserRequestPrivate::tryAutoLogin()
+-{
+-    if (m_loginButton.isNull()) return false;
+-
+-    if (m_usernameField.isNull() ||
+-        m_usernameField.evaluateJavaScript("this.value").isNull())
+-        return false;
+-
+-    if (m_passwordField.isNull() ||
+-        m_passwordField.evaluateJavaScript("this.value").isNull())
+-        return false;
+-
+-    /* Avoid falling in a failed login loop */
+-    m_loginCount++;
+-    if (m_loginCount > 1)
+-        return false;
+-
+-    m_loginButton.evaluateJavaScript("this.click()");
+-    return true;
+-}
+-
+ BrowserRequest::BrowserRequest(const QDBusConnection &connection,
+-                             const QDBusMessage &message,
+-                             const QVariantMap &parameters,
+-                             QObject *parent):
++                               const QDBusMessage &message,
++                               const QVariantMap &parameters,
++                               QObject *parent):
+     Request(connection, message, parameters, parent),
+     d_ptr(new BrowserRequestPrivate(this))
+ {
+diff -U 3 -H -d -r -N -- a/src/browser-request.h b/src/browser-request.h
+--- a/src/browser-request.h	2015-11-26 02:34:03.000000000 +1000
++++ b/src/browser-request.h	2023-09-18 07:38:06.271073010 +1000
+@@ -1,7 +1,7 @@
+ /*
+  * This file is part of signon-ui
+  *
+- * Copyright (C) 2011 Canonical Ltd.
++ * Copyright (C) 2014 Canonical Ltd.
+  *
+  * Contact: Alberto Mardegan <alberto.mardegan at canonical.com>
+  *
+diff -U 3 -H -d -r -N -- a/src/debug.cpp b/src/debug.cpp
+--- a/src/debug.cpp	2015-11-26 02:34:03.000000000 +1000
++++ b/src/debug.cpp	2023-09-18 07:38:06.271073010 +1000
+@@ -20,10 +20,18 @@
+
+ #include "debug.h"
+
++Q_LOGGING_CATEGORY(DBG_SIGNON_UI, "signon", QtWarningMsg)
++
+ int appLoggingLevel = 1; // criticals
+
+ void setLoggingLevel(int level)
+ {
++    if (level >= 1) {
++        QLoggingCategory::setFilterRules("signon.warning=true");
++        if (level >= 2) {
++            QLoggingCategory::setFilterRules("signon.debug=true");
++        }
++    }
+     appLoggingLevel = level;
+ }
+
+diff -U 3 -H -d -r -N -- a/src/debug.h b/src/debug.h
+--- a/src/debug.h	2015-11-26 02:34:03.000000000 +1000
++++ b/src/debug.h	2023-09-18 07:38:06.271073010 +1000
+@@ -20,21 +20,13 @@
+ #ifndef SIGNON_UI_DEBUG_H
+ #define SIGNON_UI_DEBUG_H
+
+-#include <QDebug>
++#include <QLoggingCategory>
++
++Q_DECLARE_LOGGING_CATEGORY(DBG_SIGNON_UI)
+
+ /* 0 - fatal, 1 - critical(default), 2 - info/debug */
+ extern int appLoggingLevel;
+
+-static inline bool debugEnabled()
+-{
+-    return appLoggingLevel >= 2;
+-}
+-
+-static inline bool criticalsEnabled()
+-{
+-    return appLoggingLevel >= 1;
+-}
+-
+ static inline int loggingLevel()
+ {
+     return appLoggingLevel;
+@@ -42,15 +34,10 @@
+
+ void setLoggingLevel(int level);
+
+-#ifdef DEBUG_ENABLED
+-    #define TRACE() \
+-        if (debugEnabled()) qDebug() << __FILE__ << __LINE__ << __func__
+-    #define BLAME() \
+-        if (criticalsEnabled()) qCritical() << __FILE__ << __LINE__ << __func__
+-#else
+-    #define TRACE() while (0) qDebug()
+-    #define BLAME() while (0) qDebug()
+-#endif
++#define TRACE() \
++    qCDebug(DBG_SIGNON_UI) << __FILE__ << __LINE__ << __func__
++#define BLAME() \
++    qCWarning(DBG_SIGNON_UI) << __FILE__ << __LINE__ << __func__
+
+ #endif // SIGNON_UI_DEBUG_H
+
+diff -U 3 -H -d -r -N -- a/src/main.cpp b/src/main.cpp
+--- a/src/main.cpp	2015-11-26 02:34:03.000000000 +1000
++++ b/src/main.cpp	2023-09-18 07:38:06.271073010 +1000
+@@ -29,6 +29,7 @@
+ #include <QDBusConnection>
+ #include <QProcessEnvironment>
+ #include <QSettings>
++#include <QtWebEngine>
+
+ using namespace SignOnUi;
+
+@@ -39,6 +40,8 @@
+ int main(int argc, char **argv)
+ {
+     QApplication app(argc, argv);
++    QtWebEngine::initialize();
++
+     app.setApplicationName("signon-ui");
+     app.setQuitOnLastWindowClosed(false);
+
+diff -U 3 -H -d -r -N -- a/src/qml/DefaultPage.qml b/src/qml/DefaultPage.qml
+--- a/src/qml/DefaultPage.qml	2015-11-26 02:34:03.000000000 +1000
++++ b/src/qml/DefaultPage.qml	2023-09-18 07:38:06.271073010 +1000
+@@ -1,14 +1,11 @@
+ import QtQuick 2.0
+-import Ubuntu.Components 0.1
+
+-Page {
+-    Loader {
+-        id: loader
+-        anchors {
+-            fill: parent
+-            bottomMargin: osk.height
+-        }
+-        focus: true
+-        sourceComponent: browserComponent
++Loader {
++    id: loader
++    anchors {
++        fill: parent
++        bottomMargin: osk.height
+     }
++    focus: true
++    sourceComponent: browserComponent
+ }
+diff -U 3 -H -d -r -N -- a/src/qml/MainWindow.qml b/src/qml/MainWindow.qml
+--- a/src/qml/MainWindow.qml	2015-11-26 02:34:03.000000000 +1000
++++ b/src/qml/MainWindow.qml	2023-09-18 07:38:06.271073010 +1000
+@@ -1,10 +1,9 @@
+ import QtQuick 2.0
+-import Ubuntu.Components 0.1
+
+-MainView {
++Item {
+     id: root
+-    width: units.gu(60)
+-    height: units.gu(90)
++    width: 600
++    height: 400
+     property var signonRequest: request
+
+     Loader {
+diff -U 3 -H -d -r -N -- a/src/qml/ProgressBar.qml b/src/qml/ProgressBar.qml
+--- a/src/qml/ProgressBar.qml	1970-01-01 10:00:00.000000000 +1000
++++ b/src/qml/ProgressBar.qml	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,13 @@
++import QtQuick 2.0
++
++Item {
++    id: root
++
++    property real value: 0
++
++    Rectangle {
++        anchors { left: parent.left; top: parent.top; bottom: parent.bottom }
++        color: "red"
++        width: root.value * root.width
++    }
++}
+diff -U 3 -H -d -r -N -- a/src/qml/UserAgent.qml b/src/qml/UserAgent.qml
+--- a/src/qml/UserAgent.qml	1970-01-01 10:00:00.000000000 +1000
++++ b/src/qml/UserAgent.qml	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,90 @@
++/*
++ * Copyright 2013 Canonical Ltd.
++ *
++ * This file is part of webbrowser-app.
++ *
++ * webbrowser-app is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; version 3.
++ *
++ * webbrowser-app is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
++ */
++
++import QtQuick 2.0
++import QtQuick.Window 2.0
++import Ubuntu.Components 0.1
++import "ua-overrides.js" as Overrides
++
++/*
++ * Useful documentation:
++ *   http://en.wikipedia.org/wiki/User_agent#Format
++ *   https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference
++ *   https://wiki.mozilla.org/B2G/User_Agent
++ *   https://github.com/mozilla-b2g/gaia/blob/master/build/ua-override-prefs.js
++ *   https://developers.google.com/chrome/mobile/docs/user-agent
++ */
++
++// This is an Item, not a QtObject, because it needs information about the Screen.
++Item {
++    // %1: form factor (Mobile, Tablet, Desktop)
++    // %2: WebKit version
++    readonly property string _template: "Mozilla/5.0 (Ubuntu; %1) WebKit/%2"
++
++    // See Source/WebCore/Configurations/Version.xcconfig in QtWebKit’s source tree
++    // TODO: determine this value at runtime
++    readonly property string _webkitVersion: "537.21"
++
++    // FIXME: this is a quick hack that will become increasingly unreliable
++    // as we support more devices, so we need a better solution for this
++    // FIXME: only handling phone and tablet for now, need to handle desktop too
++    readonly property string _formFactor: (Screen.width >= units.gu(60)) ? "Tablet" : "Mobile"
++
++    property string defaultUA: _template.arg(_formFactor).arg(_webkitVersion)
++
++    property var overrides: Overrides.overrides
++
++    function getDomain(url) {
++        var domain = url.toString()
++        var indexOfScheme = domain.indexOf("://")
++        if (indexOfScheme !== -1) {
++            domain = domain.slice(indexOfScheme + 3)
++        }
++        var indexOfPath = domain.indexOf("/")
++        if (indexOfPath !== -1) {
++            domain = domain.slice(0, indexOfPath)
++        }
++        return domain
++    }
++
++    function getDomains(domain) {
++        var components = domain.split(".")
++        var domains = []
++        for (var i = 0; i < components.length; i++) {
++            domains.push(components.slice(i).join("."))
++        }
++        return domains
++    }
++
++    function getUAString(url) {
++        var ua = defaultUA
++        var domains = getDomains(getDomain(url))
++        for (var i = 0; i < domains.length; i++) {
++            var domain = domains[i]
++            if (domain in overrides) {
++                var form = overrides[domain]
++                if (typeof form == "string") {
++                    return form
++                } else if (typeof form == "object") {
++                    return ua.replace(form[0], form[1])
++                }
++            }
++        }
++        return ua
++    }
++}
+diff -U 3 -H -d -r -N -- a/src/qml/WebView.qml b/src/qml/WebView.qml
+--- a/src/qml/WebView.qml	2015-11-26 02:34:03.000000000 +1000
++++ b/src/qml/WebView.qml	2023-09-18 07:38:06.271073010 +1000
+@@ -1,24 +1,38 @@
+ import QtQuick 2.0
+-import Ubuntu.Components 0.1
+-import Ubuntu.Components.Extras.Browser 0.2
+-import com.canonical.Oxide 1.0
++import QtWebEngine 1.1
++
++WebEngineView {
++    id: root
++
++    property bool lastLoadFailed: false
+
+-UbuntuWebView {
+     Component.onCompleted: url = signonRequest.startUrl
+
+     onLoadingChanged: {
+         console.log("Loading changed")
+-        if (loading) {
++        if (loading && !lastLoadFailed) {
+             signonRequest.onLoadStarted()
+-        } else if (lastLoadSucceeded) {
++        } else if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
++            lastLoadFailed = false
+             signonRequest.onLoadFinished(true)
+-        } else {
++        } else if (loadRequest.status == WebEngineView.LoadFailedStatus) {
++            lastLoadFailed = true
+             signonRequest.onLoadFinished(false)
+         }
+     }
+     onUrlChanged: signonRequest.currentUrl = url
+
+-    context: UbuntuWebContext {
+-        dataPath: rootDir
++    profile: WebEngineProfile {
++        cachePath: rootDir
++        persistentStoragePath: rootDir
++    }
++
++    ProgressBar {
++        anchors.top: parent.top
++        anchors.left: parent.left
++        anchors.right: parent.right
++        height: 6
++        visible: root.loading
++        value: root.loadProgress / 100
+     }
+ }
+diff -U 3 -H -d -r -N -- a/src/qml/browser-process.cpp b/src/qml/browser-process.cpp
+--- a/src/qml/browser-process.cpp	1970-01-01 10:00:00.000000000 +1000
++++ b/src/qml/browser-process.cpp	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,291 @@
++/*
++ * This file is part of signon-ui
++ *
++ * Copyright (C) 2013 Canonical Ltd.
++ *
++ * Contact: Alberto Mardegan <alberto.mardegan at canonical.com>
++ *
++ * This program is free software: you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 3, as published
++ * by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranties of
++ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
++ * PURPOSE.  See the GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program.  If not, see <http://www.gnu.org/licenses/>.
++ */
++
++#include "browser-process.h"
++
++#include "debug.h"
++#include "dialog.h"
++#include "i18n.h"
++#include "remote-request-interface.h"
++
++#include <QQmlContext>
++#include <SignOn/uisessiondata_priv.h>
++#include <stdio.h>
++#include <QDir>
++#include <QFile>
++#include <QTimer>
++
++using namespace SignOnUi;
++
++namespace SignOnUi {
++
++class BrowserProcessPrivate: public QObject
++{
++    Q_OBJECT
++    Q_DECLARE_PUBLIC(BrowserProcess)
++    Q_PROPERTY(QUrl pageComponentUrl READ pageComponentUrl CONSTANT)
++    Q_PROPERTY(QUrl currentUrl READ currentUrl WRITE setCurrentUrl)
++    Q_PROPERTY(QUrl startUrl READ startUrl CONSTANT)
++    Q_PROPERTY(QUrl finalUrl READ finalUrl CONSTANT)
++
++public:
++    BrowserProcessPrivate(BrowserProcess *request);
++    ~BrowserProcessPrivate();
++
++    void processClientRequest();
++
++    void setCurrentUrl(const QUrl &url);
++    QUrl pageComponentUrl() const;
++    QUrl currentUrl() const { return m_currentUrl; }
++    QUrl startUrl() const { return m_startUrl; }
++    QUrl finalUrl() const { return m_finalUrl; }
++    QUrl responseUrl() const { return m_responseUrl; }
++    WId windowId() const {
++        return m_clientData[SSOUI_KEY_WINDOWID].toUInt();
++    }
++    bool embeddedUi() const {
++        return m_clientData[SSOUI_KEY_EMBEDDED].toBool();
++    }
++
++
++public Q_SLOTS:
++    void onLoadStarted();
++    void onLoadFinished(bool ok);
++    void cancel();
++
++private Q_SLOTS:
++    void start(const QVariantMap &params);
++    void onFailTimer();
++    void onFinished();
++
++private:
++    void buildDialog(const QVariantMap &params);
++
++private:
++    Dialog *m_dialog;
++    QVariantMap m_clientData;
++    QUrl m_currentUrl;
++    QUrl m_startUrl;
++    QUrl m_finalUrl;
++    QUrl m_responseUrl;
++    QString m_host;
++    QFile m_input;
++    QFile m_output;
++    RemoteRequestServer m_server;
++    QTimer m_failTimer;
++    mutable BrowserProcess *q_ptr;
++};
++
++} // namespace
++
++BrowserProcessPrivate::BrowserProcessPrivate(BrowserProcess *process):
++    QObject(process),
++    m_dialog(0),
++    q_ptr(process)
++{
++    m_failTimer.setSingleShot(true);
++    m_failTimer.setInterval(3000);
++    QObject::connect(&m_failTimer, SIGNAL(timeout()),
++                     this, SLOT(onFailTimer()));
++}
++
++BrowserProcessPrivate::~BrowserProcessPrivate()
++{
++    delete m_dialog;
++}
++
++QUrl BrowserProcessPrivate::pageComponentUrl() const
++{
++    /* We define the X-PageComponent key to let the clients override the QML
++     * component to be used to build the authentication page.
++     * To prevent a malicious client to show it's own UI, we require that the
++     * file path begins with "/usr/share/signon-ui/" (where Ubuntu click
++     * packages cannot install files).
++     */
++    QUrl providedUrl = m_clientData.value("X-PageComponent").toString();
++    if (providedUrl.isValid() && providedUrl.isLocalFile() &&
++        providedUrl.path().startsWith("/usr/share/signon-ui/")) {
++        return providedUrl;
++    } else {
++        return QStringLiteral("DefaultPage.qml");
++    }
++}
++
++void BrowserProcessPrivate::processClientRequest()
++{
++    TRACE();
++    m_input.open(stdin, QIODevice::ReadOnly);
++    m_output.open(stdout, QIODevice::WriteOnly);
++
++    QObject::connect(&m_server, SIGNAL(started(const QVariantMap&)),
++                     this, SLOT(start(const QVariantMap&)));
++    QObject::connect(&m_server, SIGNAL(canceled()),
++                     this, SLOT(cancel()));
++
++    /* This effectively starts the communication with the client */
++    m_server.setChannels(&m_input, &m_output);
++}
++
++void BrowserProcessPrivate::setCurrentUrl(const QUrl &url)
++{
++    TRACE() << "Url changed:" << url;
++    m_failTimer.stop();
++
++    if (url.host() == m_finalUrl.host() &&
++        url.path() == m_finalUrl.path()) {
++        m_responseUrl = url;
++        if (!m_dialog->isVisible()) {
++            /* Do not show the notification page. */
++            m_dialog->accept();
++        } else {
++            /* Replace the web page with an information screen */
++            /* TODO */
++            m_dialog->accept();
++        }
++    }
++}
++
++void BrowserProcessPrivate::onLoadStarted()
++{
++    m_failTimer.stop();
++}
++
++void BrowserProcessPrivate::onLoadFinished(bool ok)
++{
++    TRACE() << "Load finished" << ok;
++
++    if (!ok) {
++        m_failTimer.start();
++        return;
++    }
++
++    if (!m_dialog->isVisible()) {
++        if (m_responseUrl.isEmpty()) {
++            Dialog::ShowMode mode = (windowId() == 0) ? Dialog::TopLevel :
++                embeddedUi() ? Dialog::Embedded : Dialog::Transient;
++            m_dialog->show(windowId(), mode);
++        } else {
++            onFinished();
++        }
++    }
++}
++
++void BrowserProcessPrivate::start(const QVariantMap &params)
++{
++    TRACE() << params;
++    if (params.contains(SSOUI_KEY_CLIENT_DATA)) {
++        m_clientData = params[SSOUI_KEY_CLIENT_DATA].toMap();
++    }
++    m_finalUrl = params.value(SSOUI_KEY_FINALURL).toString();
++    m_startUrl = params.value(SSOUI_KEY_OPENURL).toString();
++    buildDialog(params);
++
++    QObject::connect(m_dialog, SIGNAL(finished(int)),
++                     this, SLOT(onFinished()));
++
++    QUrl webview("qrc:/MainWindow.qml");
++    QDir qmlDir("/usr/share/signon-ui/qml");
++    if (qmlDir.exists())
++    {
++        QFileInfo qmlFile(qmlDir.absolutePath() + "/MainWindow.qml");
++        if (qmlFile.exists())
++            webview.setUrl(qmlFile.absoluteFilePath());
++    }
++
++    m_dialog->rootContext()->setContextProperty("request", this);
++    m_dialog->setSource(webview);
++}
++
++void BrowserProcessPrivate::cancel()
++{
++    Q_Q(BrowserProcess);
++
++    TRACE() << "Client requested to cancel";
++    m_server.setCanceled();
++    if (m_dialog) {
++        m_dialog->close();
++    }
++    Q_EMIT q->finished();
++}
++
++void BrowserProcessPrivate::onFailTimer()
++{
++    Q_Q(BrowserProcess);
++
++    TRACE() << "Page loading failed";
++    m_server.setResult(QVariantMap());
++    if (m_dialog) {
++        m_dialog->close();
++    }
++    Q_EMIT q->finished();
++}
++
++void BrowserProcessPrivate::onFinished()
++{
++    Q_Q(BrowserProcess);
++
++    TRACE() << "Browser dialog closed";
++
++    QVariantMap reply;
++    QUrl url = m_responseUrl.isEmpty() ? m_currentUrl : m_responseUrl;
++    reply[SSOUI_KEY_URLRESPONSE] = url.toString();
++
++    m_server.setResult(reply);
++    m_dialog->close();
++
++    Q_EMIT q->finished();
++}
++
++void BrowserProcessPrivate::buildDialog(const QVariantMap &params)
++{
++    m_dialog = new Dialog;
++
++    QString title;
++    if (params.contains(SSOUI_KEY_TITLE)) {
++        title = params[SSOUI_KEY_TITLE].toString();
++    } else if (params.contains(SSOUI_KEY_CAPTION)) {
++        title = _("Web authentication for %1").
++            arg(params[SSOUI_KEY_CAPTION].toString());
++    } else {
++        title = _("Web authentication");
++    }
++
++    m_dialog->setTitle(title);
++
++    TRACE() << "Dialog was built";
++}
++
++BrowserProcess::BrowserProcess(QObject *parent):
++    QObject(parent),
++    d_ptr(new BrowserProcessPrivate(this))
++{
++}
++
++BrowserProcess::~BrowserProcess()
++{
++}
++
++void BrowserProcess::processClientRequest()
++{
++    Q_D(BrowserProcess);
++    d->processClientRequest();
++}
++
++#include "browser-process.moc"
+diff -U 3 -H -d -r -N -- a/src/qml/browser-process.h b/src/qml/browser-process.h
+--- a/src/qml/browser-process.h	1970-01-01 10:00:00.000000000 +1000
++++ b/src/qml/browser-process.h	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,50 @@
++/*
++ * This file is part of signon-ui
++ *
++ * Copyright (C) 2013 Canonical Ltd.
++ *
++ * Contact: Alberto Mardegan <alberto.mardegan at canonical.com>
++ *
++ * This program is free software: you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 3, as published
++ * by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranties of
++ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
++ * PURPOSE.  See the GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program.  If not, see <http://www.gnu.org/licenses/>.
++ */
++
++#ifndef SIGNON_UI_BROWSER_PROCESS_H
++#define SIGNON_UI_BROWSER_PROCESS_H
++
++#include <QObject>
++
++namespace SignOnUi {
++
++class BrowserProcessPrivate;
++class BrowserProcess: public QObject
++{
++    Q_OBJECT
++
++public:
++    BrowserProcess(QObject *parent = 0);
++    ~BrowserProcess();
++
++    void processClientRequest();
++
++Q_SIGNALS:
++    void finished();
++
++private:
++    BrowserProcessPrivate *d_ptr;
++    Q_DECLARE_PRIVATE(BrowserProcess)
++};
++
++} // namespace
++
++#endif // SIGNON_UI_BROWSER_PROCESS_H
++
+diff -U 3 -H -d -r -N -- a/src/qml/browser-process.pro b/src/qml/browser-process.pro
+--- a/src/qml/browser-process.pro	1970-01-01 10:00:00.000000000 +1000
++++ b/src/qml/browser-process.pro	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,64 @@
++include(../../common-project-config.pri)
++include($${TOP_SRC_DIR}/common-vars.pri)
++
++TEMPLATE = app
++TARGET = browser-process
++
++target.path = $${LIBEXECDIR}/signon-ui
++INSTALLS += target
++
++I18N_DOMAIN = signon-ui
++
++CONFIG += \
++    link_pkgconfig \
++    qt
++
++QT += \
++    core \
++    gui \
++    quick
++
++PKGCONFIG += \
++    signon-plugins-common
++
++INCLUDEPATH += ..
++
++HEADERS = \
++    browser-process.h \
++    debug.h \
++    dialog.h \
++    ../i18n.h \
++    ../remote-request-interface.h
++SOURCES = \
++    browser-process.cpp \
++    dialog.cpp \
++    main.cpp \
++    ../i18n.cpp \
++    ../remote-request-interface.cpp
++
++DEFINES += \
++    DEBUG_ENABLED \
++    I18N_DOMAIN=\\\"$${I18N_DOMAIN}\\\"
++
++CONFIG(force-foreign-qwindow) {
++    DEFINES += FORCE_FOREIGN_QWINDOW
++}
++
++OTHER_FILES += \
++    DefaultPage.qml \
++    KeyboardRectangle.qml \
++    MainWindow.qml \
++    StandardAnimation.qml \
++    UserAgent.qml \
++    WebView.qml \
++    ua-overrides.js
++
++RESOURCES += \
++    qml.qrc
++
++QMAKE_SUBSTITUTES += \
++    signon-ui-browser-process.desktop.in
++desktop.path = $${INSTALL_PREFIX}/share/applications
++desktop.files += signon-ui-browser-process.desktop
++INSTALLS += desktop
++
+diff -U 3 -H -d -r -N -- a/src/qml/debug.h b/src/qml/debug.h
+--- a/src/qml/debug.h	1970-01-01 10:00:00.000000000 +1000
++++ b/src/qml/debug.h	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,37 @@
++/*
++ * This file is part of signon-ui
++ *
++ * Copyright (C) 2011 Canonical Ltd.
++ *
++ * Contact: Alberto Mardegan <alberto.mardegan at canonical.com>
++ *
++ * This program is free software: you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 3, as published
++ * by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranties of
++ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
++ * PURPOSE.  See the GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program.  If not, see <http://www.gnu.org/licenses/>.
++ */
++#ifndef SIGNON_UI_DEBUG_H
++#define SIGNON_UI_DEBUG_H
++
++#include <QDebug>
++
++
++#ifdef DEBUG_ENABLED
++    #define TRACE() \
++        qDebug() << __FILE__ << __LINE__ << __func__
++    #define BLAME() \
++        qCritical() << __FILE__ << __LINE__ << __func__
++#else
++    #define TRACE() while (0) qDebug()
++    #define BLAME() while (0) qDebug()
++#endif
++
++#endif // SIGNON_UI_DEBUG_H
++
+diff -U 3 -H -d -r -N -- a/src/qml/main.cpp b/src/qml/main.cpp
+--- a/src/qml/main.cpp	1970-01-01 10:00:00.000000000 +1000
++++ b/src/qml/main.cpp	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,68 @@
++/*
++ * This file is part of signon-ui
++ *
++ * Copyright (C) 2013 Canonical Ltd.
++ *
++ * Contact: Alberto Mardegan <alberto.mardegan at canonical.com>
++ *
++ * This program is free software: you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 3, as published
++ * by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranties of
++ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
++ * PURPOSE.  See the GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program.  If not, see <http://www.gnu.org/licenses/>.
++ */
++
++#include "browser-process.h"
++
++#include "debug.h"
++
++#include <QGuiApplication>
++#include <fcntl.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++
++using namespace SignOnUi;
++
++void stderrMessage(QtMsgType type, const QMessageLogContext &context,
++                   const QString &msg)
++{
++    Q_UNUSED(context);
++    QByteArray localMsg = msg.toLocal8Bit();
++    switch (type) {
++    case QtDebugMsg:
++        fprintf(stderr, "Debug: %s\n", localMsg.constData());
++        break;
++    case QtWarningMsg:
++        fprintf(stderr, "Warning: %s\n", localMsg.constData());
++        break;
++    case QtCriticalMsg:
++        fprintf(stderr, "Critical: %s\n", localMsg.constData());
++        break;
++    case QtFatalMsg:
++        fprintf(stderr, "Fatal: %s\n", localMsg.constData());
++        abort();
++    }
++}
++
++int main(int argc, char **argv)
++{
++    qInstallMessageHandler(stderrMessage);
++    TRACE() << "started";
++    QGuiApplication app(argc, argv);
++    app.setQuitOnLastWindowClosed(false);
++    fcntl(fileno(stdin), F_SETFL, fcntl(fileno(stdin), F_GETFL, 0) | O_NONBLOCK);
++    BrowserProcess browserProcess;
++
++    QObject::connect(&browserProcess, SIGNAL(finished()),
++                     &app, SLOT(quit()));
++    browserProcess.processClientRequest();
++    return app.exec();
++}
++
+diff -U 3 -H -d -r -N -- a/src/qml/qml.qrc b/src/qml/qml.qrc
+--- a/src/qml/qml.qrc	2015-11-26 02:34:03.000000000 +1000
++++ b/src/qml/qml.qrc	2023-09-18 07:38:06.271073010 +1000
+@@ -3,6 +3,7 @@
+         <file>DefaultPage.qml</file>
+         <file>KeyboardRectangle.qml</file>
+         <file>MainWindow.qml</file>
++        <file>ProgressBar.qml</file>
+         <file>StandardAnimation.qml</file>
+         <file>WebView.qml</file>
+     </qresource>
+diff -U 3 -H -d -r -N -- a/src/qml/signon-ui-browser-process.desktop.in b/src/qml/signon-ui-browser-process.desktop.in
+--- a/src/qml/signon-ui-browser-process.desktop.in	1970-01-01 10:00:00.000000000 +1000
++++ b/src/qml/signon-ui-browser-process.desktop.in	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,11 @@
++[Desktop Entry]
++Encoding=UTF-8
++Version=1.0
++Name=Account authentication
++Comment=Login to online accounts
++Exec=$${target.path}/$$TARGET
++Icon=
++Type=Application
++Terminal=false
++NoDisplay=true
++X-Ubuntu-Gettext-Domain=signon-ui
+diff -U 3 -H -d -r -N -- a/src/qml/ua-overrides.js b/src/qml/ua-overrides.js
+--- a/src/qml/ua-overrides.js	1970-01-01 10:00:00.000000000 +1000
++++ b/src/qml/ua-overrides.js	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,99 @@
++/*
++ * Copyright 2013 Canonical Ltd.
++ *
++ * This file is part of webbrowser-app.
++ *
++ * webbrowser-app is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; version 3.
++ *
++ * webbrowser-app is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
++ */
++
++.pragma library
++
++// B2G’s list of overrides: https://github.com/mozilla-b2g/gaia/blob/master/build/ua-override-prefs.js
++
++// List of user agent string overrides in the form of an object.
++// Each key is a domain name for which the default user agent string doesn’t
++// work well enough. Values can either be a string (full override) or an array
++// containing two values that are passed to the String.replace method (the
++// first value may be either a string or a regular expression, the second value
++// must be a string).
++
++// Examples of valid entries:
++//     "example.org": "full override"
++//     "example.com": ["Ubuntu", "Ubuntu Edge"]
++//     "google.com": [/mobi/i, "b"]
++
++// The original list was initially built from the top 100 entries
++// at http://www.alexa.com/topsites (2013-08-16), using Chrome on
++// Android as a reference.
++
++var overrides = {
++    "mail.google.com": [/Mobile\) WebKit\/[.0-9]*/, "Android 4.3) AppleWebKit Mobile Safari"],
++    "google.com": ["Mobile", "Android; Mobile"],
++    "youtube.com": ["Mobile", "Android; Mobile"],
++    "yahoo.com": ["Mobile", "Android; Mobile"],
++    "baidu.com": ["Mobile", "Android; Mobile"],
++    "qq.com": [/WebKit\/[.0-9]*/, "Apple$& Mobile"],
++    "amazon.com": ["Mobile", "Android; Mobile"],
++    "linkedin.com": ["Mobile", "Android; Mobile"],
++    "blogspot.com": ["Mobile", "Android; Mobile"],
++    "taobao.com": ["Mobile", "Android; Mobile"],
++    "google.co.in": ["Mobile", "Android; Mobile"],
++    "bing.com": ["Mobile", "Android; Mobile"],
++    "yahoo.co.jp": ["Ubuntu", "Linux; Android 4; Galaxy Build/"],
++    "yandex.ru": ["Mobile", "Android; Mobile"],
++    "sina.com.cn": ["Mobile", "Android; Mobile"],
++    "ebay.com": ["Mobile", "Android; Mobile"],
++    "google.de": ["Mobile", "Android; Mobile"],
++    "tumblr.com": ["Mobile", "Android; Mobile"],
++    "google.co.uk": ["Mobile", "Android; Mobile"],
++    "msn.com": ["Mobile", "Android; Mobile"],
++    "google.fr": ["Mobile", "Android; Mobile"],
++    "mail.ru": ["Ubuntu", "Linux; Android 4; Galaxy Build/"],
++    "google.com.br": ["Mobile", "Android; Mobile"],
++    "google.co.jp": ["Mobile", "Android; Mobile"],
++    "hao123.com": ["Mobile", "Android; Mobile"],
++    "ask.com": ["Mobile", "Android; Mobile"],
++    "google.com.hk": ["Mobile", "Android; Mobile"],
++    "google.ru": ["Mobile", "Android; Mobile"],
++    "blogger.com": ["Mobile", "Android; Mobile"],
++    "imdb.com": ["Mobile", "Android; Mobile"],
++    "google.it": ["Mobile", "Android; Mobile"],
++    "google.es": ["Mobile", "Android; Mobile"],
++    "amazon.co.jp": ["Mobile", "Android; Mobile"],
++    "tmall.com": ["Mobile", "Android; Mobile"],
++    "fc2.com": ["Mobile", "Android; Mobile"],
++    "google.com.mx": ["Mobile", "Android; Mobile"],
++    "google.ca": ["Mobile", "Android; Mobile"],
++    "soso.com": ["Mobile", "Android; Mobile"],
++    "delta-search.com": ["Mobile", "Android; Mobile"],
++    "odnoklassniki.ru": ["Mobile", "Android; Mobile"],
++    "alibaba.com": ["Mobile", "Android; Mobile"],
++    "flickr.com": ["Mobile", "Android; Mobile"],
++    "amazon.de": ["Mobile", "Android; Mobile"],
++    "blogspot.in": ["Mobile", "Android; Mobile"],
++    "ifeng.com": ["Mobile", "Android; Mobile"],
++    "360.cn": ["Mobile", "Android; Mobile"],
++    "google.com.tr": ["Mobile", "Android; Mobile"],
++    "google.com.au": ["Mobile", "Android; Mobile"],
++    "youku.com": ["Mobile", "Android; Mobile"],
++    "ebay.de": ["Mobile", "Android; Mobile"],
++    "uol.com.br": ["Mobile", "Android; Mobile"],
++    "aol.com": ["Mobile", "Android; Mobile"],
++    "google.pl": ["Mobile", "Android; Mobile"],
++    "alipay.com": ["Mobile", "Android; Mobile"],
++    "dailymotion.com": ["Mobile", "Android; Mobile Safari"],
++    "amazon.co.uk": ["Mobile", "Android; Mobile"],
++    "ebay.co.uk": ["Mobile", "Android; Mobile"],
++    "facebook.com": [/WebKit\/[.0-9]*/, "Apple$& Firefox/18"],
++    "nytimes.com": ["Mobile", "Android; Mobile Safari"],
++};
+diff -U 3 -H -d -r -N -- a/src/qquick-dialog.cpp b/src/qquick-dialog.cpp
+--- a/src/qquick-dialog.cpp	2015-11-26 02:34:03.000000000 +1000
++++ b/src/qquick-dialog.cpp	2023-09-18 07:38:06.271073010 +1000
+@@ -18,9 +18,6 @@
+  * with this program.  If not, see <http://www.gnu.org/licenses/>.
+  */
+
+-#define HAS_FOREIGN_QWINDOW (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) || \
+-                             defined(FORCE_FOREIGN_QWINDOW))
+-
+ #include "qquick-dialog.h"
+
+ #include "debug.h"
+@@ -33,28 +30,12 @@
+     QQuickView(parent)
+ {
+     setResizeMode(QQuickView::SizeRootObjectToView);
+-    setWindowState(Qt::WindowFullScreen);
+ }
+
+ Dialog::~Dialog()
+ {
+ }
+
+-void Dialog::show(WId parent, ShowMode mode)
+-{
+-#if HAS_FOREIGN_QWINDOW
+-    if (mode != TopLevel) {
+-        QWindow *parentWindow = QWindow::fromWinId(parent);
+-        if (mode == Transient) {
+-            setTransientParent(parentWindow);
+-        } else if (mode == Embedded) {
+-            setParent(parentWindow);
+-        }
+-    }
+-#endif
+-    QQuickView::show();
+-}
+-
+ void Dialog::accept()
+ {
+     done(Dialog::Accepted);
+diff -U 3 -H -d -r -N -- a/src/qquick-dialog.h b/src/qquick-dialog.h
+--- a/src/qquick-dialog.h	2015-11-26 02:34:03.000000000 +1000
++++ b/src/qquick-dialog.h	2023-09-18 07:38:06.271073010 +1000
+@@ -45,8 +45,6 @@
+     explicit Dialog(QWindow *parent = 0);
+     ~Dialog();
+
+-    void show(WId parent, ShowMode mode);
+-
+ public Q_SLOTS:
+     void accept();
+     void reject();
+diff -U 3 -H -d -r -N -- a/src/request.cpp b/src/request.cpp
+--- a/src/request.cpp	2015-11-26 02:34:03.000000000 +1000
++++ b/src/request.cpp	2023-09-18 07:38:06.271073010 +1000
+@@ -18,20 +18,13 @@
+  * with this program.  If not, see <http://www.gnu.org/licenses/>.
+  */
+
+-#define HAS_XEMBED (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
+ #define HAS_FOREIGN_QWINDOW (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) || \
+                              defined(FORCE_FOREIGN_QWINDOW))
+ #include "request.h"
+
+-#ifdef USE_UBUNTU_WEB_VIEW
+-#include "ubuntu-browser-request.h"
+-#endif
+ #include "browser-request.h"
+ #include "debug.h"
+ #include "dialog-request.h"
+-#if HAS_XEMBED
+-#include "embed-manager.h"
+-#endif
+ #include "errors.h"
+ #include "indicator-service.h"
+ #ifndef UNIT_TESTS
+@@ -81,13 +74,10 @@
+     }
+
+ private Q_SLOTS:
+-#if HAS_XEMBED
+-    void onEmbedError();
+-#endif
+     void onIndicatorCallFinished(QDBusPendingCallWatcher *watcher);
+
+ private:
+-    void setWidget(QWidget *widget);
++    bool setWindow(QWindow *window);
+     Accounts::Account *findAccount();
+     bool dispatchToIndicator();
+     void onIndicatorCallSucceeded();
+@@ -100,7 +90,7 @@
+     QVariantMap m_clientData;
+     bool m_inProgress;
+     Accounts::Manager *m_accountManager;
+-    QPointer<QWidget> m_widget;
++    QPointer<QWindow> m_window;
+ };
+
+ } // namespace
+@@ -116,7 +106,7 @@
+     m_parameters(parameters),
+     m_inProgress(false),
+     m_accountManager(0),
+-    m_widget(0)
++    m_window(0)
+ {
+     if (parameters.contains(SSOUI_KEY_CLIENT_DATA)) {
+         QVariant variant = parameters[SSOUI_KEY_CLIENT_DATA];
+@@ -130,83 +120,43 @@
+ {
+ }
+
+-void RequestPrivate::setWidget(QWidget *widget)
++bool RequestPrivate::setWindow(QWindow *window)
+ {
+-    if (m_widget != 0) {
++    if (m_window != 0) {
+         BLAME() << "Widget already set";
+-        return;
++        return false;
+     }
+
+-    m_widget = widget;
++    m_window = window;
+
+-#if HAS_XEMBED
+-    if (embeddedUi() && windowId() != 0) {
+-        TRACE() << "Requesting widget embedding";
+-        QX11EmbedWidget *embed =
+-            EmbedManager::instance()->widgetFor(windowId());
+-        QObject::connect(embed, SIGNAL(error(QX11EmbedWidget::Error)),
+-                         this, SLOT(onEmbedError()),
+-                         Qt::UniqueConnection);
+-        QObject::connect(embed, SIGNAL(containerClosed()),
+-                         widget, SLOT(close()));
+-        QVBoxLayout *layout = new QVBoxLayout;
+-        layout->addWidget(widget);
+-        widget->show();
+-        /* Delete any previous layout */
+-        delete embed->layout();
+-        embed->setLayout(layout);
+-        embed->show();
+-        return;
+-    }
+-#endif
+ #if HAS_FOREIGN_QWINDOW
+     if (embeddedUi() && windowId() != 0) {
+         TRACE() << "Requesting window embedding";
+         QWindow *host = QWindow::fromWinId(windowId());
+-        widget->show();
+-        widget->windowHandle()->setParent(host);
+-        return;
++        window->show();
++        window->setParent(host);
++        return true;
+     }
+ #endif
+
+     /* If the window has no parent and the webcredentials indicator service is
+      * up, dispatch the request to it. */
+     if (windowId() == 0 && dispatchToIndicator()) {
+-        return;
++        return false;
+     }
+
+-    widget->setWindowModality(Qt::WindowModal);
+-    widget->show();
+-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+-    if (windowId() != 0) {
+-        TRACE() << "Setting" << widget->effectiveWinId() << "transient for" << windowId();
+-        XSetTransientForHint(QX11Info::display(),
+-                             widget->effectiveWinId(),
+-                             windowId());
+-    }
+-#endif
++    window->setModality(Qt::WindowModal);
++    window->show();
+ #if HAS_FOREIGN_QWINDOW
+     if (windowId() != 0) {
+         TRACE() << "Requesting window reparenting";
+         QWindow *parent = QWindow::fromWinId(windowId());
+-        widget->windowHandle()->setTransientParent(parent);
++        window->setTransientParent(parent);
+     }
+ #endif
++    return true;
+ }
+
+-#if HAS_XEMBED
+-void RequestPrivate::onEmbedError()
+-{
+-    Q_Q(Request);
+-
+-    QX11EmbedWidget *embed = qobject_cast<QX11EmbedWidget*>(sender());
+-    TRACE() << "Embed error:" << embed->error();
+-
+-    q->fail(SIGNON_UI_ERROR_EMBEDDING_FAILED,
+-            QString("Embedding signon UI failed: %1").arg(embed->error()));
+-}
+-#endif
+-
+ Accounts::Account *RequestPrivate::findAccount()
+ {
+     if (!m_parameters.contains(SSOUI_KEY_IDENTITY))
+@@ -285,8 +235,8 @@
+     if (watcher->isError()) {
+         /* if the notification could not be delivered to the indicator, show
+          * the widget. */
+-        if (m_widget != 0)
+-            m_widget->show();
++        if (m_window != 0)
++            m_window->show();
+     } else {
+         onIndicatorCallSucceeded();
+     }
+@@ -310,18 +260,8 @@
+                              QObject *parent)
+ {
+     if (parameters.contains(SSOUI_KEY_OPENURL)) {
+-#ifdef USE_UBUNTU_WEB_VIEW
+-        TRACE() << "Platform:" << QGuiApplication::platformName();
+-        /* We need to use the RemoteRequest implementation in UbuntuTouch,
+-         * because displaying of QtWidgets is not working there. This is a
+-         * workaround which can be revisited later. */
+-        if (QGuiApplication::platformName().startsWith("ubuntu") ||
+-            qgetenv("SSOUI_USE_UBUNTU_WEB_VIEW") == QByteArray("1")) {
+-            return new UbuntuBrowserRequest(connection, message,
+-                                            parameters, parent);
+-        }
+-#endif
+-        return new BrowserRequest(connection, message, parameters, parent);
++        return new BrowserRequest(connection, message,
++                                  parameters, parent);
+     } else {
+         return new DialogRequest(connection, message, parameters, parent);
+     }
+@@ -354,7 +294,15 @@
+ void Request::setWidget(QWidget *widget)
+ {
+     Q_D(Request);
+-    d->setWidget(widget);
++    if (d->setWindow(widget->windowHandle())) {
++        widget->show();
++    }
++}
++
++void Request::setWindow(QWindow *window)
++{
++    Q_D(Request);
++    d->setWindow(window);
+ }
+
+ uint Request::identity() const
+diff -U 3 -H -d -r -N -- a/src/request.h b/src/request.h
+--- a/src/request.h	2015-11-26 02:34:03.000000000 +1000
++++ b/src/request.h	2023-09-18 07:38:06.271073010 +1000
+@@ -70,6 +70,7 @@
+                      QObject *parent = 0);
+
+     void setWidget(QWidget *widget);
++    void setWindow(QWindow *window);
+
+ protected Q_SLOTS:
+     void fail(const QString &name, const QString &message);
+diff -U 3 -H -d -r -N -- a/src/signon-ui.pro b/src/signon-ui.pro
+--- a/src/signon-ui.pro	2015-11-26 02:34:03.000000000 +1000
++++ b/src/signon-ui.pro	2023-09-18 07:38:06.271073010 +1000
+@@ -17,7 +17,7 @@
+     gui \
+     network \
+     quick \
+-    webkit
++    webengine
+
+ PKGCONFIG += \
+     signon-plugins-common \
+@@ -31,7 +31,6 @@
+         x11
+ } else {
+     QT += \
+-        webkitwidgets \
+         widgets
+     PKGCONFIG += \
+         accounts-qt5 \
+@@ -54,6 +53,7 @@
+     inactivity-timer.h \
+     indicator-service.h \
+     network-access-manager.h \
++    qquick-dialog.h \
+     reauthenticator.h \
+     request.h \
+     service.h \
+@@ -73,6 +73,7 @@
+     main.cpp \
+     my-network-proxy-factory.cpp \
+     network-access-manager.cpp \
++    qquick-dialog.cpp \
+     reauthenticator.cpp \
+     request.cpp \
+     service.cpp \
+@@ -83,33 +84,20 @@
+     SOURCES += embed-manager.cpp
+ }
+
+-COMMANDLINE = ""
+-
+-CONFIG(use-ubuntu-web-view) {
+-    DEFINES += USE_UBUNTU_WEB_VIEW
+-    HEADERS += \
+-        qquick-dialog.h \
+-        ubuntu-browser-request.h
+-    SOURCES += \
+-        qquick-dialog.cpp \
+-        ubuntu-browser-request.cpp
+-    OTHER_FILES += \
+-        qml/DefaultPage.qml \
+-        qml/KeyboardRectangle.qml \
+-        qml/MainWindow.qml \
+-        qml/StandardAnimation.qml \
+-        qml/WebView.qml
+-    RESOURCES += \
+-        qml/qml.qrc
+-
+-    QMAKE_SUBSTITUTES += \
+-        signon-ui.desktop.in
+-    desktop.path = $${INSTALL_PREFIX}/share/applications
+-    desktop.files += signon-ui.desktop
+-    INSTALLS += desktop
++OTHER_FILES += \
++    qml/DefaultPage.qml \
++    qml/KeyboardRectangle.qml \
++    qml/MainWindow.qml \
++    qml/StandardAnimation.qml \
++    qml/WebView.qml
++RESOURCES += \
++    qml/qml.qrc
+
+-    COMMANDLINE += " --desktop_file_hint=$${INSTALL_PREFIX}/share/applications/signon-ui.desktop"
+-}
++QMAKE_SUBSTITUTES += \
++    signon-ui.desktop.in
++desktop.path = $${INSTALL_PREFIX}/share/applications
++desktop.files += signon-ui.desktop
++INSTALLS += desktop
+
+ DEFINES += \
+     DEBUG_ENABLED \
+diff -U 3 -H -d -r -N -- a/src/ubuntu-browser-request.cpp b/src/ubuntu-browser-request.cpp
+--- a/src/ubuntu-browser-request.cpp	2015-11-26 02:34:03.000000000 +1000
++++ b/src/ubuntu-browser-request.cpp	1970-01-01 10:00:00.000000000 +1000
+@@ -1,279 +0,0 @@
+-/*
+- * This file is part of signon-ui
+- *
+- * Copyright (C) 2013 Canonical Ltd.
+- *
+- * Contact: Alberto Mardegan <alberto.mardegan at canonical.com>
+- *
+- * This program is free software: you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 3, as published
+- * by the Free Software Foundation.
+- *
+- * This program is distributed in the hope that it will be useful, but
+- * WITHOUT ANY WARRANTY; without even the implied warranties of
+- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+- * PURPOSE.  See the GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License along
+- * with this program.  If not, see <http://www.gnu.org/licenses/>.
+- */
+-
+-#include "ubuntu-browser-request.h"
+-
+-#include "debug.h"
+-#include "qquick-dialog.h"
+-#include "errors.h"
+-#include "i18n.h"
+-
+-#include <QDir>
+-#include <QQmlContext>
+-#include <QStandardPaths>
+-#include <QTimer>
+-#include <SignOn/uisessiondata_priv.h>
+-
+-using namespace SignOnUi;
+-using namespace SignOnUi::QQuick;
+-
+-namespace SignOnUi {
+-
+-class UbuntuBrowserRequestPrivate: public QObject
+-{
+-    Q_OBJECT
+-    Q_DECLARE_PUBLIC(UbuntuBrowserRequest)
+-    Q_PROPERTY(QUrl pageComponentUrl READ pageComponentUrl CONSTANT)
+-    Q_PROPERTY(QUrl currentUrl READ currentUrl WRITE setCurrentUrl)
+-    Q_PROPERTY(QUrl startUrl READ startUrl CONSTANT)
+-    Q_PROPERTY(QUrl finalUrl READ finalUrl CONSTANT)
+-
+-public:
+-    UbuntuBrowserRequestPrivate(UbuntuBrowserRequest *request);
+-    ~UbuntuBrowserRequestPrivate();
+-
+-    void start();
+-
+-    void setCurrentUrl(const QUrl &url);
+-    QUrl pageComponentUrl() const;
+-    QUrl currentUrl() const { return m_currentUrl; }
+-    QUrl startUrl() const { return m_startUrl; }
+-    QUrl finalUrl() const { return m_finalUrl; }
+-    QUrl responseUrl() const { return m_responseUrl; }
+-
+-public Q_SLOTS:
+-    void cancel();
+-    void onLoadStarted();
+-    void onLoadFinished(bool ok);
+-
+-private Q_SLOTS:
+-    void onFailTimer();
+-    void onFinished();
+-
+-private:
+-    void buildDialog(const QVariantMap &params);
+-
+-private:
+-    Dialog *m_dialog;
+-    QUrl m_currentUrl;
+-    QUrl m_startUrl;
+-    QUrl m_finalUrl;
+-    QUrl m_responseUrl;
+-    QTimer m_failTimer;
+-    mutable UbuntuBrowserRequest *q_ptr;
+-};
+-
+-} // namespace
+-
+-UbuntuBrowserRequestPrivate::UbuntuBrowserRequestPrivate(
+-    UbuntuBrowserRequest *request):
+-    QObject(request),
+-    m_dialog(0),
+-    q_ptr(request)
+-{
+-    m_failTimer.setSingleShot(true);
+-    m_failTimer.setInterval(3000);
+-    QObject::connect(&m_failTimer, SIGNAL(timeout()),
+-                     this, SLOT(onFailTimer()));
+-}
+-
+-UbuntuBrowserRequestPrivate::~UbuntuBrowserRequestPrivate()
+-{
+-    delete m_dialog;
+-}
+-
+-void UbuntuBrowserRequestPrivate::start()
+-{
+-    Q_Q(UbuntuBrowserRequest);
+-
+-    const QVariantMap &params = q->parameters();
+-    TRACE() << params;
+-
+-    QString cachePath =
+-        QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
+-    QDir rootDir = cachePath + QString("/id-%1").arg(q->identity());
+-    if (!rootDir.exists()) {
+-        rootDir.mkpath(".");
+-    }
+-
+-    m_finalUrl = params.value(SSOUI_KEY_FINALURL).toString();
+-    m_startUrl = params.value(SSOUI_KEY_OPENURL).toString();
+-    buildDialog(params);
+-
+-    QObject::connect(m_dialog, SIGNAL(finished(int)),
+-                     this, SLOT(onFinished()));
+-
+-    QUrl webview("qrc:/MainWindow.qml");
+-    QDir qmlDir("/usr/share/signon-ui/qml");
+-    if (qmlDir.exists())
+-    {
+-        QFileInfo qmlFile(qmlDir.absolutePath() + "/MainWindow.qml");
+-        if (qmlFile.exists())
+-            webview.setUrl(qmlFile.absoluteFilePath());
+-    }
+-
+-    m_dialog->rootContext()->setContextProperty("request", this);
+-    m_dialog->rootContext()->setContextProperty("rootDir",
+-                                                QUrl::fromLocalFile(rootDir.absolutePath()));
+-    m_dialog->setSource(webview);
+-}
+-
+-QUrl UbuntuBrowserRequestPrivate::pageComponentUrl() const
+-{
+-    Q_Q(const UbuntuBrowserRequest);
+-    /* We define the X-PageComponent key to let the clients override the QML
+-     * component to be used to build the authentication page.
+-     * To prevent a malicious client to show it's own UI, we require that the
+-     * file path begins with "/usr/share/signon-ui/" (where Ubuntu click
+-     * packages cannot install files).
+-     */
+-    QUrl providedUrl = q->clientData().value("X-PageComponent").toString();
+-    if (providedUrl.isValid() && providedUrl.isLocalFile() &&
+-        providedUrl.path().startsWith("/usr/share/signon-ui/")) {
+-        return providedUrl;
+-    } else {
+-        return QStringLiteral("DefaultPage.qml");
+-    }
+-}
+-
+-void UbuntuBrowserRequestPrivate::setCurrentUrl(const QUrl &url)
+-{
+-    TRACE() << "Url changed:" << url;
+-    m_failTimer.stop();
+-
+-    if (url.host() == m_finalUrl.host() &&
+-        url.path() == m_finalUrl.path()) {
+-        m_responseUrl = url;
+-        if (!m_dialog->isVisible()) {
+-            /* Do not show the notification page. */
+-            m_dialog->accept();
+-        } else {
+-            /* Replace the web page with an information screen */
+-            /* TODO */
+-            m_dialog->accept();
+-        }
+-    }
+-}
+-
+-void UbuntuBrowserRequestPrivate::cancel()
+-{
+-    Q_Q(UbuntuBrowserRequest);
+-
+-    TRACE() << "Client requested to cancel";
+-    q->setCanceled();
+-    if (m_dialog) {
+-        m_dialog->close();
+-    }
+-}
+-
+-void UbuntuBrowserRequestPrivate::onLoadStarted()
+-{
+-    m_failTimer.stop();
+-}
+-
+-void UbuntuBrowserRequestPrivate::onLoadFinished(bool ok)
+-{
+-    Q_Q(const UbuntuBrowserRequest);
+-
+-    TRACE() << "Load finished" << ok;
+-
+-    if (!ok) {
+-        m_failTimer.start();
+-        return;
+-    }
+-
+-    if (!m_dialog->isVisible()) {
+-        if (m_responseUrl.isEmpty()) {
+-            Dialog::ShowMode mode = (q->windowId() == 0) ? Dialog::TopLevel :
+-                q->embeddedUi() ? Dialog::Embedded : Dialog::Transient;
+-            m_dialog->show(q->windowId(), mode);
+-        } else {
+-            onFinished();
+-        }
+-    }
+-}
+-
+-void UbuntuBrowserRequestPrivate::onFailTimer()
+-{
+-    Q_Q(UbuntuBrowserRequest);
+-
+-    TRACE() << "Page loading failed";
+-    if (m_dialog) {
+-        m_dialog->close();
+-    }
+-    q->setResult(QVariantMap());
+-}
+-
+-void UbuntuBrowserRequestPrivate::onFinished()
+-{
+-    Q_Q(UbuntuBrowserRequest);
+-
+-    TRACE() << "Browser dialog closed";
+-
+-    QVariantMap reply;
+-    QUrl url = m_responseUrl.isEmpty() ? m_currentUrl : m_responseUrl;
+-    reply[SSOUI_KEY_URLRESPONSE] = url.toString();
+-
+-    m_dialog->close();
+-
+-    q->setResult(reply);
+-}
+-
+-void UbuntuBrowserRequestPrivate::buildDialog(const QVariantMap &params)
+-{
+-    m_dialog = new Dialog;
+-
+-    QString title;
+-    if (params.contains(SSOUI_KEY_TITLE)) {
+-        title = params[SSOUI_KEY_TITLE].toString();
+-    } else if (params.contains(SSOUI_KEY_CAPTION)) {
+-        title = _("Web authentication for %1").
+-            arg(params[SSOUI_KEY_CAPTION].toString());
+-    } else {
+-        title = _("Web authentication");
+-    }
+-
+-    m_dialog->setTitle(title);
+-
+-    TRACE() << "Dialog was built";
+-}
+-
+-UbuntuBrowserRequest::UbuntuBrowserRequest(const QDBusConnection &connection,
+-                                           const QDBusMessage &message,
+-                                           const QVariantMap &parameters,
+-                                           QObject *parent):
+-    Request(connection, message, parameters, parent),
+-    d_ptr(new UbuntuBrowserRequestPrivate(this))
+-{
+-}
+-
+-UbuntuBrowserRequest::~UbuntuBrowserRequest()
+-{
+-}
+-
+-void UbuntuBrowserRequest::start()
+-{
+-    Q_D(UbuntuBrowserRequest);
+-
+-    Request::start();
+-    d->start();
+-}
+-
+-#include "ubuntu-browser-request.moc"
+diff -U 3 -H -d -r -N -- a/src/ubuntu-browser-request.h b/src/ubuntu-browser-request.h
+--- a/src/ubuntu-browser-request.h	2015-11-26 02:34:03.000000000 +1000
++++ b/src/ubuntu-browser-request.h	1970-01-01 10:00:00.000000000 +1000
+@@ -1,54 +0,0 @@
+-/*
+- * This file is part of signon-ui
+- *
+- * Copyright (C) 2014 Canonical Ltd.
+- *
+- * Contact: Alberto Mardegan <alberto.mardegan at canonical.com>
+- *
+- * This program is free software: you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 3, as published
+- * by the Free Software Foundation.
+- *
+- * This program is distributed in the hope that it will be useful, but
+- * WITHOUT ANY WARRANTY; without even the implied warranties of
+- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+- * PURPOSE.  See the GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License along
+- * with this program.  If not, see <http://www.gnu.org/licenses/>.
+- */
+-
+-#ifndef SIGNON_UI_UBUNTU_BROWSER_REQUEST_H
+-#define SIGNON_UI_UBUNTU_BROWSER_REQUEST_H
+-
+-#include "request.h"
+-
+-#include <QObject>
+-
+-namespace SignOnUi {
+-
+-class UbuntuBrowserRequestPrivate;
+-
+-class UbuntuBrowserRequest: public Request
+-{
+-    Q_OBJECT
+-
+-public:
+-    explicit UbuntuBrowserRequest(const QDBusConnection &connection,
+-                                  const QDBusMessage &message,
+-                                  const QVariantMap &parameters,
+-                                  QObject *parent = 0);
+-    ~UbuntuBrowserRequest();
+-
+-    // reimplemented virtual methods
+-    void start();
+-
+-private:
+-    UbuntuBrowserRequestPrivate *d_ptr;
+-    Q_DECLARE_PRIVATE(UbuntuBrowserRequest)
+-};
+-
+-} // namespace
+-
+-#endif // SIGNON_UI_UBUNTU_BROWSER_REQUEST_H
+-
+diff -U 3 -H -d -r -N -- a/tests/unit/.gitignore b/tests/unit/.gitignore
+--- a/tests/unit/.gitignore	1970-01-01 10:00:00.000000000 +1000
++++ b/tests/unit/.gitignore	2023-09-18 07:38:06.271073010 +1000
+@@ -0,0 +1,2 @@
++signon-ui-unittest
++tst_inactivity_timer
+diff -U 3 -H -d -r -N -- a/tests/unit/tst_signon_ui.pro b/tests/unit/tst_signon_ui.pro
+--- a/tests/unit/tst_signon_ui.pro	2015-11-26 02:34:03.000000000 +1000
++++ b/tests/unit/tst_signon_ui.pro	2023-09-18 07:38:06.275073016 +1000
+@@ -14,7 +14,8 @@
+     dbus \
+     gui \
+     network \
+-    webkit
++    quick \
++    webengine
+
+ PKGCONFIG += \
+     signon-plugins-common \
+@@ -48,6 +49,7 @@
+     $$TOP_SRC_DIR/src/i18n.cpp \
+     $$TOP_SRC_DIR/src/indicator-service.cpp \
+     $$TOP_SRC_DIR/src/network-access-manager.cpp \
++    $$TOP_SRC_DIR/src/qquick-dialog.cpp \
+     $$TOP_SRC_DIR/src/reauthenticator.cpp \
+     $$TOP_SRC_DIR/src/request.cpp \
+     $$TOP_SRC_DIR/src/webcredentials_adaptor.cpp
+@@ -64,6 +66,7 @@
+     $$TOP_SRC_DIR/src/http-warning.h \
+     $$TOP_SRC_DIR/src/indicator-service.h \
+     $$TOP_SRC_DIR/src/network-access-manager.h \
++    $$TOP_SRC_DIR/src/qquick-dialog.h \
+     $$TOP_SRC_DIR/src/reauthenticator.h \
+     $$TOP_SRC_DIR/src/request.h \
+     $$TOP_SRC_DIR/src/webcredentials_adaptor.h
diff --git a/debian/patches/0002_signon-ui-0.15-fix-qt5-build.diff b/debian/patches/0002_signon-ui-0.15-fix-qt5-build.diff
new file mode 100644
index 0000000..fd846ff
--- /dev/null
+++ b/debian/patches/0002_signon-ui-0.15-fix-qt5-build.diff
@@ -0,0 +1,35 @@
+diff --git a/src/request.cpp b/src/request.cpp
+index 5556c79..4f51e8e 100644
+--- a/src/request.cpp
++++ b/src/request.cpp
+@@ -81,9 +81,7 @@ public:
+     }
+
+ private Q_SLOTS:
+-#if HAS_XEMBED
+     void onEmbedError();
+-#endif
+     void onIndicatorCallFinished(QDBusPendingCallWatcher *watcher);
+
+ private:
+@@ -194,9 +192,9 @@ void RequestPrivate::setWidget(QWidget *widget)
+ #endif
+ }
+
+-#if HAS_XEMBED
+ void RequestPrivate::onEmbedError()
+ {
++#if HAS_XEMBED
+     Q_Q(Request);
+
+     QX11EmbedWidget *embed = qobject_cast<QX11EmbedWidget*>(sender());
+@@ -204,8 +202,8 @@ void RequestPrivate::onEmbedError()
+
+     q->fail(SIGNON_UI_ERROR_EMBEDDING_FAILED,
+             QString("Embedding signon UI failed: %1").arg(embed->error()));
+-}
+ #endif
++}
+
+ Accounts::Account *RequestPrivate::findAccount()
+ {
diff --git a/debian/patches/0003_fake-user-agent.diff b/debian/patches/0003_fake-user-agent.diff
new file mode 100644
index 0000000..2246817
--- /dev/null
+++ b/debian/patches/0003_fake-user-agent.diff
@@ -0,0 +1,12 @@
+diff --git a/src/qml/WebView.qml b/src/qml/WebView.qml
+index 33462b8..b720111 100644
+--- a/src/qml/WebView.qml
++++ b/src/qml/WebView.qml
+@@ -25,6 +25,7 @@ WebEngineView {
+     profile: WebEngineProfile {
+         cachePath: rootDir
+         persistentStoragePath: rootDir
++        httpUserAgent: "Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/77.0"
+     }
+
+     ProgressBar {
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..68b4fcd
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+0001_gitlab_tag_0.17+15.10.20150810-0ubuntu1.diff
+#0002_signon-ui-0.15-fix-qt5-build.diff
+0003_fake-user-agent.diff
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..117a259
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+export DPKG_GENSYMBOLS_CHECK_LEVEL=4
+export QT_SELECT=qt5
+
+include /usr/share/dpkg/architecture.mk
+
+LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
+
+override_dh_auto_configure:
+	dh_auto_configure -- "CONFIG+=force-foreign-qwindow" \
+		"CONFIG+=use-ubuntu-web-view" \
+		"HTTP_WARNING_HELP=help:web-credentials/http-warning" \
+		"LIBDIR=$(LIBDIR)" \
+		"LIBEXECDIR=$(LIBDIR)"
+
+%:
+	dh $@
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
new file mode 100644
index 0000000..f71bdf3
--- /dev/null
+++ b/debian/salsa-ci.yml
@@ -0,0 +1,7 @@
+include:
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+variables:
+  SALSA_CI_DISABLE_MISSING_BREAKS: 'no'
+  SALSA_CI_DISABLE_RC_BUGS: 'no'
+  SALSA_CI_REPROTEST_ARGS: '--variations=-build-path'
diff --git a/debian/signon-ui-service.install b/debian/signon-ui-service.install
new file mode 100644
index 0000000..e7e60ae
--- /dev/null
+++ b/debian/signon-ui-service.install
@@ -0,0 +1,2 @@
+usr/share/dbus-1/services/com.canonical.indicators.webcredentials.service
+usr/share/dbus-1/services/com.nokia.singlesignonui.service
diff --git a/debian/signon-ui-x11.install b/debian/signon-ui-x11.install
new file mode 100644
index 0000000..dfb802a
--- /dev/null
+++ b/debian/signon-ui-x11.install
@@ -0,0 +1,2 @@
+usr/bin/signon-ui
+usr/share/applications/signon-ui.desktop
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..36553fb
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=4
+http://archive.ubuntu.com/ubuntu/pool/main/s/signon-ui/ signon-ui_(.+).orig.tar.(?:gz|xz|bz2)


More information about the Neon-commits mailing list