[neon/backports-jammy/signon-ui/Neon/release] debian/patches: refresh patches

Carlos De Maine null at kde.org
Wed Oct 4 13:19:01 BST 2023


Git commit 0bc9183baf7017bda88d8876322577f042396a26 by Carlos De Maine.
Committed on 04/10/2023 at 14:16.
Pushed by carlosdem into branch 'Neon/release'.

refresh patches

M  +188  -221  debian/patches/0001_gitlab_tag_0.17+15.10.20150810-0ubuntu1.diff
M  +2    -4    debian/patches/0003_fake-user-agent.diff

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

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
index 34d175e..e15ad66 100644
--- 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
@@ -1,6 +1,5 @@
-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
+--- /dev/null
++++ b/src/.gitignore
 @@ -0,0 +1,6 @@
 +com.canonical.indicators.webcredentials.service
 +com.nokia.singlesignonui.service
@@ -8,9 +7,8 @@ diff -U 3 -H -d -r -N -- a/src/.gitignore b/src/.gitignore
 +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
+--- a/src/browser-request.cpp
++++ b/src/browser-request.cpp
 @@ -1,7 +1,8 @@
  /*
   * This file is part of signon-ui
@@ -22,9 +20,9 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
   * 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"
@@ -33,7 +31,7 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 +#include "qquick-dialog.h"
 +#include "errors.h"
  #include "i18n.h"
-
+ 
 -#include <QDBusArgument>
 -#include <QDesktopServices>
 -#include <QIcon>
@@ -59,12 +57,12 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 -#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");
@@ -257,17 +255,17 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 +    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);
@@ -290,7 +288,7 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 -    void startProgress();
 -    void stopProgress();
 -    void onContentsChanged();
-
+ 
  private:
 -    void showDialog();
 -    void setupViewForUrl(const QUrl &url);
@@ -302,7 +300,7 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 -    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
@@ -336,9 +334,9 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
      QTimer m_failTimer;
 +    mutable BrowserRequest *q_ptr;
  };
-
+ 
  } // namespace
-
+ 
 -BrowserRequestPrivate::BrowserRequestPrivate(BrowserRequest *request):
 +BrowserRequestPrivate::BrowserRequestPrivate(
 +    BrowserRequest *request):
@@ -359,7 +357,7 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 @@ -328,45 +100,99 @@
      delete m_dialog;
  }
-
+ 
 -void BrowserRequestPrivate::onSslErrors(QNetworkReply *reply,
 -                                        const QList<QSslError> &errors)
 +void BrowserRequestPrivate::start()
@@ -377,7 +375,7 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 +    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();
@@ -393,14 +391,14 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 +        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
  {
@@ -420,12 +418,12 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 +        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;
@@ -444,7 +442,7 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
          }
      }
 +}
-
+ 
 -    setupViewForUrl(url);
 -    m_httpWarning->setVisible(url.scheme() == "http");
 +void BrowserRequestPrivate::cancel()
@@ -457,24 +455,24 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 +        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();
@@ -492,7 +490,7 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
              onFinished();
          }
 @@ -393,166 +211,30 @@
-
+ 
  void BrowserRequestPrivate::onFailTimer()
  {
 -    notifyLoadFailed();
@@ -501,7 +499,7 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 -void BrowserRequestPrivate::addBrowserCookies(CookieJar *cookieJar)
 -{
      Q_Q(BrowserRequest);
-
+ 
 -    const QVariantMap &clientData = q->clientData();
 -    if (!clientData.contains(keyCookies)) return;
 -
@@ -521,21 +519,22 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 -        }
 -    } else {
 -        rawCookies = qdbus_cast<RawCookies>(arg);
--    }
++    TRACE() << "Page loading failed";
++    if (m_dialog) {
++        m_dialog->close();
+     }
 -
 -    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);
--}
--
++    q->setResult(QVariantMap());
+ }
+ 
 -void BrowserRequestPrivate::startProgress()
 -{
 -    m_animationLabel->start();
@@ -546,14 +545,13 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 -{
 -    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);
 -
@@ -591,9 +589,15 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 -        /* by default, allow only https */
 -        page->setAllowedSchemes(QStringList("https"));
 -    }
--
++    TRACE() << "Browser dialog closed";
++    QObject::disconnect(m_dialog, SIGNAL(finished(int)),
++                        this, SLOT(onFinished()));
+ 
 -    m_ignoreSslErrors = clientData.value(keyIgnoreSslErrors, false).toBool();
--
++    QVariantMap reply;
++    QUrl url = m_responseUrl.isEmpty() ? m_currentUrl : m_responseUrl;
++    reply[SSOUI_KEY_URLRESPONSE] = url.toString();
+ 
 -    QUrl url(params.value(SSOUI_KEY_OPENURL).toString());
 -    setupViewForUrl(url);
 -    QObject::connect(m_webView, SIGNAL(urlChanged(const QUrl&)),
@@ -646,35 +650,29 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 -
 -    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);
@@ -688,10 +686,10 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
 -    m_loadFailurePage = buildLoadFailurePage();
 -    m_dialogLayout->addWidget(m_loadFailurePage);
 +    m_dialog->setTitle(title);
-
+ 
      TRACE() << "Dialog was built";
  }
-
+ 
 -void BrowserRequestPrivate::start()
 -{
 -    Q_Q(BrowserRequest);
@@ -908,9 +906,8 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.cpp b/src/browser-request.cpp
      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
+--- a/src/browser-request.h
++++ b/src/browser-request.h
 @@ -1,7 +1,7 @@
  /*
   * This file is part of signon-ui
@@ -920,17 +917,16 @@ diff -U 3 -H -d -r -N -- a/src/browser-request.h b/src/browser-request.h
   *
   * 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
+--- a/src/debug.cpp
++++ b/src/debug.cpp
 @@ -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) {
@@ -941,22 +937,21 @@ diff -U 3 -H -d -r -N -- a/src/debug.cpp b/src/debug.cpp
 +    }
      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
+ 
+--- a/src/debug.h
++++ b/src/debug.h
 @@ -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;
@@ -971,9 +966,9 @@ diff -U 3 -H -d -r -N -- a/src/debug.h b/src/debug.h
  {
      return appLoggingLevel;
 @@ -42,15 +34,10 @@
-
+ 
  void setLoggingLevel(int level);
-
+ 
 -#ifdef DEBUG_ENABLED
 -    #define TRACE() \
 -        if (debugEnabled()) qDebug() << __FILE__ << __LINE__ << __func__
@@ -987,20 +982,19 @@ diff -U 3 -H -d -r -N -- a/src/debug.h b/src/debug.h
 +    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
+ 
+--- a/src/main.cpp
++++ b/src/main.cpp
 @@ -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)
  {
@@ -1009,14 +1003,13 @@ diff -U 3 -H -d -r -N -- a/src/main.cpp b/src/main.cpp
 +
      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
+ 
+--- a/src/qml/DefaultPage.qml
++++ b/src/qml/DefaultPage.qml
 @@ -1,14 +1,11 @@
  import QtQuick 2.0
--import Ubuntu.Components 0.1
-
+-import Ubuntu.Components 1.3
+ 
 -Page {
 -    Loader {
 -        id: loader
@@ -1035,26 +1028,23 @@ diff -U 3 -H -d -r -N -- a/src/qml/DefaultPage.qml b/src/qml/DefaultPage.qml
 +    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
+--- a/src/qml/MainWindow.qml
++++ b/src/qml/MainWindow.qml
 @@ -1,10 +1,9 @@
  import QtQuick 2.0
--import Ubuntu.Components 0.1
-
--MainView {
-+Item {
+-import Ubuntu.Components 1.3
+ 
+ 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
+--- /dev/null
++++ b/src/qml/ProgressBar.qml
 @@ -0,0 +1,13 @@
 +import QtQuick 2.0
 +
@@ -1069,9 +1059,8 @@ diff -U 3 -H -d -r -N -- a/src/qml/ProgressBar.qml b/src/qml/ProgressBar.qml
 +        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
+--- /dev/null
++++ b/src/qml/UserAgent.qml
 @@ -0,0 +1,90 @@
 +/*
 + * Copyright 2013 Canonical Ltd.
@@ -1163,60 +1152,59 @@ diff -U 3 -H -d -r -N -- a/src/qml/UserAgent.qml b/src/qml/UserAgent.qml
 +        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 @@
+--- a/src/qml/WebView.qml
++++ b/src/qml/WebView.qml
+@@ -1,35 +1,37 @@
  import QtQuick 2.0
--import Ubuntu.Components 0.1
--import Ubuntu.Components.Extras.Browser 0.2
--import com.canonical.Oxide 1.0
+-import Ubuntu.Components 1.3
+-import Ubuntu.Web 0.2
 +import QtWebEngine 1.1
-+
+ 
+-WebView {
 +WebEngineView {
-+    id: root
-+
+     id: root
+ 
 +    property bool lastLoadFailed: false
-
--UbuntuWebView {
++
      Component.onCompleted: url = signonRequest.startUrl
-
-     onLoadingChanged: {
+ 
+-    onLoadingStateChanged: {
++    onLoadingChanged: {
          console.log("Loading changed")
--        if (loading) {
-+        if (loading && !lastLoadFailed) {
+         if (loading && !lastLoadFailed) {
              signonRequest.onLoadStarted()
 -        } else if (lastLoadSucceeded) {
 +        } else if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
 +            lastLoadFailed = false
              signonRequest.onLoadFinished(true)
--        } else {
+-        } else if (lastLoadFailed) {
 +        } else if (loadRequest.status == WebEngineView.LoadFailedStatus) {
 +            lastLoadFailed = true
              signonRequest.onLoadFinished(false)
          }
      }
      onUrlChanged: signonRequest.currentUrl = url
-
--    context: UbuntuWebContext {
+ 
+-    context: WebContext {
 -        dataPath: rootDir
 +    profile: WebEngineProfile {
 +        cachePath: rootDir
 +        persistentStoragePath: rootDir
-+    }
-+
-+    ProgressBar {
-+        anchors.top: parent.top
-+        anchors.left: parent.left
-+        anchors.right: parent.right
+     }
+ 
+-    /* Taken from webbrowser-app */
+     ProgressBar {
+         anchors.top: parent.top
+         anchors.left: parent.left
+         anchors.right: parent.right
+-        height: units.dp(3)
+-        showProgressPercentage: false
 +        height: 6
-+        visible: root.loading
-+        value: root.loadProgress / 100
+         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
+--- /dev/null
++++ b/src/qml/browser-process.cpp
 @@ -0,0 +1,291 @@
 +/*
 + * This file is part of signon-ui
@@ -1509,9 +1497,8 @@ diff -U 3 -H -d -r -N -- a/src/qml/browser-process.cpp b/src/qml/browser-process
 +}
 +
 +#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
+--- /dev/null
++++ b/src/qml/browser-process.h
 @@ -0,0 +1,50 @@
 +/*
 + * This file is part of signon-ui
@@ -1563,9 +1550,8 @@ diff -U 3 -H -d -r -N -- a/src/qml/browser-process.h b/src/qml/browser-process.h
 +
 +#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
+--- /dev/null
++++ b/src/qml/browser-process.pro
 @@ -0,0 +1,64 @@
 +include(../../common-project-config.pri)
 +include($${TOP_SRC_DIR}/common-vars.pri)
@@ -1631,9 +1617,8 @@ diff -U 3 -H -d -r -N -- a/src/qml/browser-process.pro b/src/qml/browser-process
 +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
+--- /dev/null
++++ b/src/qml/debug.h
 @@ -0,0 +1,37 @@
 +/*
 + * This file is part of signon-ui
@@ -1672,9 +1657,8 @@ diff -U 3 -H -d -r -N -- a/src/qml/debug.h b/src/qml/debug.h
 +
 +#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
+--- /dev/null
++++ b/src/qml/main.cpp
 @@ -0,0 +1,68 @@
 +/*
 + * This file is part of signon-ui
@@ -1744,9 +1728,8 @@ diff -U 3 -H -d -r -N -- a/src/qml/main.cpp b/src/qml/main.cpp
 +    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
+--- a/src/qml/qml.qrc
++++ b/src/qml/qml.qrc
 @@ -3,6 +3,7 @@
          <file>DefaultPage.qml</file>
          <file>KeyboardRectangle.qml</file>
@@ -1755,9 +1738,8 @@ diff -U 3 -H -d -r -N -- a/src/qml/qml.qrc b/src/qml/qml.qrc
          <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
+--- /dev/null
++++ b/src/qml/signon-ui-browser-process.desktop.in
 @@ -0,0 +1,11 @@
 +[Desktop Entry]
 +Encoding=UTF-8
@@ -1770,9 +1752,8 @@ diff -U 3 -H -d -r -N -- a/src/qml/signon-ui-browser-process.desktop.in b/src/qm
 +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
+--- /dev/null
++++ b/src/qml/ua-overrides.js
 @@ -0,0 +1,99 @@
 +/*
 + * Copyright 2013 Canonical Ltd.
@@ -1873,32 +1854,25 @@ diff -U 3 -H -d -r -N -- a/src/qml/ua-overrides.js b/src/qml/ua-overrides.js
 +    "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
+--- a/src/qquick-dialog.cpp
++++ b/src/qquick-dialog.cpp
 @@ -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()
+@@ -39,22 +36,6 @@
  {
  }
-
+ 
 -void Dialog::show(WId parent, ShowMode mode)
 -{
+-    create();
 -#if HAS_FOREIGN_QWINDOW
 -    if (mode != TopLevel) {
 -        QWindow *parentWindow = QWindow::fromWinId(parent);
@@ -1915,30 +1889,28 @@ diff -U 3 -H -d -r -N -- a/src/qquick-dialog.cpp b/src/qquick-dialog.cpp
  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
+--- a/src/qquick-dialog.h
++++ b/src/qquick-dialog.h
 @@ -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
+--- a/src/request.cpp
++++ b/src/request.cpp
 @@ -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
@@ -1953,13 +1925,13 @@ diff -U 3 -H -d -r -N -- a/src/request.cpp b/src/request.cpp
  #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);
@@ -1973,7 +1945,7 @@ diff -U 3 -H -d -r -N -- a/src/request.cpp b/src/request.cpp
 -    QPointer<QWidget> m_widget;
 +    QPointer<QWindow> m_window;
  };
-
+ 
  } // namespace
 @@ -116,7 +106,7 @@
      m_parameters(parameters),
@@ -1987,7 +1959,7 @@ diff -U 3 -H -d -r -N -- a/src/request.cpp b/src/request.cpp
 @@ -130,83 +120,43 @@
  {
  }
-
+ 
 -void RequestPrivate::setWidget(QWidget *widget)
 +bool RequestPrivate::setWindow(QWindow *window)
  {
@@ -1997,10 +1969,10 @@ diff -U 3 -H -d -r -N -- a/src/request.cpp b/src/request.cpp
 -        return;
 +        return false;
      }
-
+ 
 -    m_widget = widget;
 +    m_window = window;
-
+ 
 -#if HAS_XEMBED
 -    if (embeddedUi() && windowId() != 0) {
 -        TRACE() << "Requesting widget embedding";
@@ -2033,14 +2005,14 @@ diff -U 3 -H -d -r -N -- a/src/request.cpp b/src/request.cpp
 +        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)
@@ -2063,7 +2035,7 @@ diff -U 3 -H -d -r -N -- a/src/request.cpp b/src/request.cpp
  #endif
 +    return true;
  }
-
+ 
 -#if HAS_XEMBED
 -void RequestPrivate::onEmbedError()
 -{
@@ -2091,16 +2063,14 @@ diff -U 3 -H -d -r -N -- a/src/request.cpp b/src/request.cpp
      } else {
          onIndicatorCallSucceeded();
      }
-@@ -310,18 +260,8 @@
+@@ -310,16 +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("XDG_CURRENT_DESKTOP") == QByteArray("Unity") ||
 -            qgetenv("SSOUI_USE_UBUNTU_WEB_VIEW") == QByteArray("1")) {
 -            return new UbuntuBrowserRequest(connection, message,
 -                                            parameters, parent);
@@ -2112,7 +2082,7 @@ diff -U 3 -H -d -r -N -- a/src/request.cpp b/src/request.cpp
      } else {
          return new DialogRequest(connection, message, parameters, parent);
      }
-@@ -354,7 +294,15 @@
+@@ -352,7 +294,15 @@
  void Request::setWidget(QWidget *widget)
  {
      Q_D(Request);
@@ -2127,29 +2097,27 @@ diff -U 3 -H -d -r -N -- a/src/request.cpp b/src/request.cpp
 +    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
+--- a/src/request.h
++++ b/src/request.h
 @@ -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
+--- a/src/signon-ui.pro
++++ b/src/signon-ui.pro
 @@ -17,7 +17,7 @@
      gui \
      network \
      quick \
 -    webkit
 +    webengine
-
+ 
  PKGCONFIG += \
      signon-plugins-common \
 @@ -31,7 +31,6 @@
@@ -2179,7 +2147,7 @@ diff -U 3 -H -d -r -N -- a/src/signon-ui.pro b/src/signon-ui.pro
 @@ -83,33 +84,20 @@
      SOURCES += embed-manager.cpp
  }
-
+ 
 -COMMANDLINE = ""
 -
 -CONFIG(use-ubuntu-web-view) {
@@ -2204,6 +2172,9 @@ diff -U 3 -H -d -r -N -- a/src/signon-ui.pro b/src/signon-ui.pro
 -    desktop.path = $${INSTALL_PREFIX}/share/applications
 -    desktop.files += signon-ui.desktop
 -    INSTALLS += desktop
+-
+-    COMMANDLINE += " --desktop_file_hint=$${INSTALL_PREFIX}/share/applications/signon-ui.desktop"
+-}
 +OTHER_FILES += \
 +    qml/DefaultPage.qml \
 +    qml/KeyboardRectangle.qml \
@@ -2212,21 +2183,18 @@ diff -U 3 -H -d -r -N -- a/src/signon-ui.pro b/src/signon-ui.pro
 +    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 @@
+--- a/src/ubuntu-browser-request.cpp
++++ /dev/null
+@@ -1,281 +0,0 @@
 -/*
 - * This file is part of signon-ui
 - *
@@ -2455,6 +2423,8 @@ diff -U 3 -H -d -r -N -- a/src/ubuntu-browser-request.cpp b/src/ubuntu-browser-r
 -    Q_Q(UbuntuBrowserRequest);
 -
 -    TRACE() << "Browser dialog closed";
+-    QObject::disconnect(m_dialog, SIGNAL(finished(int)),
+-                        this, SLOT(onFinished()));
 -
 -    QVariantMap reply;
 -    QUrl url = m_responseUrl.isEmpty() ? m_currentUrl : m_responseUrl;
@@ -2506,9 +2476,8 @@ diff -U 3 -H -d -r -N -- a/src/ubuntu-browser-request.cpp b/src/ubuntu-browser-r
 -}
 -
 -#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
+--- a/src/ubuntu-browser-request.h
++++ /dev/null
 @@ -1,54 +0,0 @@
 -/*
 - * This file is part of signon-ui
@@ -2564,15 +2533,13 @@ diff -U 3 -H -d -r -N -- a/src/ubuntu-browser-request.h b/src/ubuntu-browser-req
 -
 -#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
+--- /dev/null
++++ b/tests/unit/.gitignore
 @@ -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
+--- a/tests/unit/tst_signon_ui.pro
++++ b/tests/unit/tst_signon_ui.pro
 @@ -14,7 +14,8 @@
      dbus \
      gui \
@@ -2580,7 +2547,7 @@ diff -U 3 -H -d -r -N -- a/tests/unit/tst_signon_ui.pro b/tests/unit/tst_signon_
 -    webkit
 +    quick \
 +    webengine
-
+ 
  PKGCONFIG += \
      signon-plugins-common \
 @@ -48,6 +49,7 @@
diff --git a/debian/patches/0003_fake-user-agent.diff b/debian/patches/0003_fake-user-agent.diff
index 2246817..ed572c2 100644
--- a/debian/patches/0003_fake-user-agent.diff
+++ b/debian/patches/0003_fake-user-agent.diff
@@ -1,12 +1,10 @@
-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 {
+@@ -25,6 +25,7 @@
      profile: WebEngineProfile {
          cachePath: rootDir
          persistentStoragePath: rootDir
 +        httpUserAgent: "Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/77.0"
      }
-
+ 
      ProgressBar {


More information about the Neon-commits mailing list