Hi all, in response to this thread: https://labs.parabola.nu/issues/1167#note-129
I have decided to write a patch that removes all functionality from signon-ui that relies on qt5-webkit/qt6-webengine to function. Since the current patch does not provide any fallback login mechanism, it will probably just SIGSEGV when it has to do any login that requires an embedded webview, ... but that's still better than blacklisting all KDE just because this stupid package requires Qt6 or whatever :)
diff --git a/src/browser-request.cpp b/src/browser-request.cpp deleted file mode 100644 index 146bec8..0000000 --- a/src/browser-request.cpp +++ /dev/null @@ -1,280 +0,0 @@ -/* - * This file is part of signon-ui - * - * Copyright (C) 2013 Canonical Ltd. - * Copyright (C) 2017 Alberto Mardegan - * - * Contact: Alberto Mardegan <[email protected]> - * - * 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-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 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(); - - 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 ¶ms); - -private: - 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): - 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())); -} - -BrowserRequestPrivate::~BrowserRequestPrivate() -{ - delete m_dialog; -} - -void BrowserRequestPrivate::start() -{ - Q_Q(BrowserRequest); - - const QVariantMap ¶ms = 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 BrowserRequestPrivate::pageComponentUrl() const -{ - 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() == 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 BrowserRequestPrivate::cancel() -{ - Q_Q(BrowserRequest); - - TRACE() << "Client requested to cancel"; - q->setCanceled(); - if (m_dialog) { - m_dialog->close(); - } -} - -void BrowserRequestPrivate::onLoadStarted() -{ - m_failTimer.stop(); -} - -void BrowserRequestPrivate::onLoadFinished(bool ok) -{ - Q_Q(BrowserRequest); - - TRACE() << "Load finished" << ok; - - if (!ok) { - m_failTimer.start(); - return; - } - - if (!m_dialog->isVisible()) { - if (m_responseUrl.isEmpty()) { - q->setWindow(m_dialog); - } else { - onFinished(); - } - } -} - -void BrowserRequestPrivate::onFailTimer() -{ - Q_Q(BrowserRequest); - - TRACE() << "Page loading failed"; - if (m_dialog) { - m_dialog->close(); - } - q->setResult(QVariantMap()); -} - -void BrowserRequestPrivate::onFinished() -{ - Q_Q(BrowserRequest); - - 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; - reply[SSOUI_KEY_URLRESPONSE] = url.toString(); - - m_dialog->close(); - - q->setResult(reply); -} - -void BrowserRequestPrivate::buildDialog(const QVariantMap ¶ms) -{ - 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"; -} - -BrowserRequest::BrowserRequest(const QDBusConnection &connection, - const QDBusMessage &message, - const QVariantMap ¶meters, - QObject *parent): - Request(connection, message, parameters, parent), - d_ptr(new BrowserRequestPrivate(this)) -{ -} - -BrowserRequest::~BrowserRequest() -{ -} - -void BrowserRequest::start() -{ - Q_D(BrowserRequest); - - Request::start(); - d->start(); -} - -#include "browser-request.moc" diff --git a/src/browser-request.h b/src/browser-request.h deleted file mode 100644 index f701513..0000000 --- a/src/browser-request.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of signon-ui - * - * Copyright (C) 2014 Canonical Ltd. - * - * Contact: Alberto Mardegan <[email protected]> - * - * 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_REQUEST_H -#define SIGNON_UI_BROWSER_REQUEST_H - -#include "request.h" - -#include <QObject> - -namespace SignOnUi { - -class BrowserRequestPrivate; - -class BrowserRequest: public Request -{ - Q_OBJECT - -public: - explicit BrowserRequest(const QDBusConnection &connection, - const QDBusMessage &message, - const QVariantMap ¶meters, - QObject *parent = 0); - ~BrowserRequest(); - - // reimplemented virtual methods - void start(); - -private: - BrowserRequestPrivate *d_ptr; - Q_DECLARE_PRIVATE(BrowserRequest) -}; - -} // namespace - -#endif // SIGNON_UI_BROWSER_REQUEST_H - diff --git a/src/main.cpp b/src/main.cpp index cf53b7a..59248e9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,11 +30,11 @@ #include <QProcessEnvironment> #include <QSettings> -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -#include <QtWebEngine> -#else -#include <QtWebEngineQuick> -#endif +// #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +// #include <QtWebEngine> +// #else +// #include <QtWebEngineQuick> +// #endif using namespace SignOnUi; @@ -45,11 +45,11 @@ static const char objectPath[] = "/SignonUi"; int main(int argc, char **argv) { QApplication app(argc, argv); -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - QtWebEngine::initialize(); -#else - QtWebEngineQuick::initialize(); -#endif +// #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +// QtWebEngine::initialize(); +// #else +// QtWebEngineQuick::initialize(); +// #endif app.setApplicationName("signon-ui"); app.setQuitOnLastWindowClosed(false); diff --git a/src/qml/MainWindow.qml b/src/qml/MainWindow.qml index 77d3775..a5f83d9 100644 --- a/src/qml/MainWindow.qml +++ b/src/qml/MainWindow.qml @@ -23,7 +23,8 @@ Item { Component { id: browserComponent - WebView { + Label { + text: "Web content has been disabled for FSDG compliance" } } } diff --git a/src/qml/WebView.qml b/src/qml/WebView.qml deleted file mode 100644 index 59ef186..0000000 --- a/src/qml/WebView.qml +++ /dev/null @@ -1,38 +0,0 @@ -import QtQuick 2.0 -import QtWebEngine 1.1 - -WebEngineView { - id: root - - property bool lastLoadFailed: false - - Component.onCompleted: url = signonRequest.startUrl - - onLoadingChanged: loadingInfo => { - console.log("Loading changed") - if (loading && !lastLoadFailed) { - signonRequest.onLoadStarted() - } else if (loadingInfo.status == WebEngineView.LoadSucceededStatus) { - lastLoadFailed = false - signonRequest.onLoadFinished(true) - } else if (loadingInfo.status == WebEngineView.LoadFailedStatus) { - lastLoadFailed = true - signonRequest.onLoadFinished(false) - } - } - onUrlChanged: signonRequest.currentUrl = url - - 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 --git a/src/qml/browser-process.cpp b/src/qml/browser-process.cpp deleted file mode 100644 index a40c86b..0000000 --- a/src/qml/browser-process.cpp +++ /dev/null @@ -1,291 +0,0 @@ -/* - * This file is part of signon-ui - * - * Copyright (C) 2013 Canonical Ltd. - * - * Contact: Alberto Mardegan <[email protected]> - * - * 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 ¶ms); - void onFailTimer(); - void onFinished(); - -private: - void buildDialog(const QVariantMap ¶ms); - -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 ¶ms) -{ - 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 ¶ms) -{ - 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 --git a/src/qml/browser-process.h b/src/qml/browser-process.h deleted file mode 100644 index 846bfbf..0000000 --- a/src/qml/browser-process.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of signon-ui - * - * Copyright (C) 2013 Canonical Ltd. - * - * Contact: Alberto Mardegan <[email protected]> - * - * 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 --git a/src/qml/browser-process.pro b/src/qml/browser-process.pro deleted file mode 100644 index ebb747c..0000000 --- a/src/qml/browser-process.pro +++ /dev/null @@ -1,64 +0,0 @@ -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 --git a/src/qml/main.cpp b/src/qml/main.cpp index 5571dc9..d459350 100644 --- a/src/qml/main.cpp +++ b/src/qml/main.cpp @@ -18,7 +18,7 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "browser-process.h" +// #include "browser-process.h" #include "debug.h" @@ -58,11 +58,11 @@ int main(int argc, char **argv) QGuiApplication app(argc, argv); app.setQuitOnLastWindowClosed(false); fcntl(fileno(stdin), F_SETFL, fcntl(fileno(stdin), F_GETFL, 0) | O_NONBLOCK); - BrowserProcess browserProcess; + // BrowserProcess browserProcess; - QObject::connect(&browserProcess, SIGNAL(finished()), - &app, SLOT(quit())); - browserProcess.processClientRequest(); + // QObject::connect(&browserProcess, SIGNAL(finished()), + // &app, SLOT(quit())); + // browserProcess.processClientRequest(); return app.exec(); } diff --git a/src/qml/qml.qrc b/src/qml/qml.qrc index 627298b..7ccface 100644 --- a/src/qml/qml.qrc +++ b/src/qml/qml.qrc @@ -5,6 +5,5 @@ <file>MainWindow.qml</file> <file>ProgressBar.qml</file> <file>StandardAnimation.qml</file> - <file>WebView.qml</file> </qresource> </RCC> diff --git a/src/request.cpp b/src/request.cpp index 17ee42a..069fd8c 100644 --- a/src/request.cpp +++ b/src/request.cpp @@ -22,7 +22,7 @@ defined(FORCE_FOREIGN_QWINDOW)) #include "request.h" -#include "browser-request.h" +// #include "browser-request.h" #include "debug.h" #include "dialog-request.h" #include "errors.h" @@ -260,8 +260,9 @@ Request *Request::newRequest(const QDBusConnection &connection, QObject *parent) { if (parameters.contains(SSOUI_KEY_OPENURL)) { - return new BrowserRequest(connection, message, - parameters, parent); + // return new BrowserRequest(connection, message, + // parameters, parent); + return NULL; } else { return new DialogRequest(connection, message, parameters, parent); } diff --git a/src/signon-ui.pro b/src/signon-ui.pro index a78ad0a..52478a6 100644 --- a/src/signon-ui.pro +++ b/src/signon-ui.pro @@ -18,12 +18,6 @@ QT += \ network \ quick -lessThan(QT_MAJOR_VERSION, 6) { - QT += webengine -} else { - QT += webenginequick -} - PKGCONFIG += \ signon-plugins-common \ libnotify \ @@ -40,7 +34,6 @@ CONFIG(force-foreign-qwindow) { HEADERS = \ animation-label.h \ - browser-request.h \ cookie-jar-manager.h \ debug.h \ dialog-request.h \ @@ -59,7 +52,6 @@ HEADERS = \ SOURCES = \ animation-label.cpp \ - browser-request.cpp \ cookie-jar-manager.cpp \ debug.cpp \ dialog-request.cpp \ @@ -82,7 +74,6 @@ OTHER_FILES += \ qml/KeyboardRectangle.qml \ qml/MainWindow.qml \ qml/StandardAnimation.qml \ - qml/WebView.qml RESOURCES += \ qml/qml.qrc
# Maintainer (arch): Antonio Rojas <[email protected]> # Maintainer (arch): Josip Ponjavic <josipponjavic at gmail dot com> # Contributor: Balló György <ballogyor+arch at gmail dot com> # Contributor: bill-auger <[email protected]> # Contributor: Iván Ãvalos <ivan at avalos dot me> # parabola changes and rationale: # - build without qt6-webengine pkgname=signon-ui pkgver=0.17+20231016 pkgrel=3 pkgrel+=.parabola1 _commit=eef943f0edf3beee8ecb85d4a9dae3656002fc24 pkgdesc='UI component responsible for handling the user interactions which can happen during the login process of an online account' arch=(x86_64) arch+=(armv7h i686) url="https://launchpad.net/online-accounts-signon-ui" license=(GPL) depends=(gcc-libs glib2 glibc libaccounts-qt libnotify libproxy qt6-base qt6-declarative signond) source=(https://gitlab.com/accounts-sso/signon-ui/-/archive/$_commit/signon-ui-$_commit.tar.gz) source+=(disable-webkit.patch) sha256sums=('0906a1adee88e331e9dcf1f2d5978c24f8564fb734f5c114c88bddb63196d3d4' 'b6c8cda6ff7907122703981dd5c9729930dd679353d5a3f0b2d4e074ae3086e3') prepare() { cd $pkgname-$_commit # Do not install tests sed -e 's|src \\|src|' -e '/tests/d' -i signon-ui.pro echo "applying disable-webkit.patch" patch -Np1 -i ${srcdir}/disable-webkit.patch } build() { cd $pkgname-$_commit qmake6 \ PREFIX=/usr \ LIBDIR=/usr/lib make } package() { cd $pkgname-$_commit make INSTALL_ROOT="$pkgdir" install }
_______________________________________________ Dev mailing list [email protected] https://lists.parabola.nu/mailman/listinfo/dev
