Merge pull request #2004 from demmm/calamares
[webview] remove broken & unused module
This commit is contained in:
commit
010ab08384
@ -60,8 +60,8 @@ modules-search: [ local ]
|
|||||||
# the instances section can safely be left empty.
|
# the instances section can safely be left empty.
|
||||||
#
|
#
|
||||||
# Module name plus instance name makes an instance key, e.g.
|
# Module name plus instance name makes an instance key, e.g.
|
||||||
# "webview@owncloud", where "webview" is the module name (for the webview
|
# "packagechooserq@licenseq", where "packagechooserq" is the module name (for the packagechooserq
|
||||||
# viewmodule) and "owncloud" is the instance name. In the *sequence*
|
# viewmodule) and "licenseq" is the instance name. In the *sequence*
|
||||||
# section below, use instance-keys to name instances (instead of just
|
# section below, use instance-keys to name instances (instead of just
|
||||||
# a module name, for modules which have only a single instance).
|
# a module name, for modules which have only a single instance).
|
||||||
#
|
#
|
||||||
@ -86,9 +86,9 @@ modules-search: [ local ]
|
|||||||
#
|
#
|
||||||
# YAML: list of maps of string:string key-value pairs.
|
# YAML: list of maps of string:string key-value pairs.
|
||||||
#instances:
|
#instances:
|
||||||
#- id: owncloud
|
#- id: licenseq
|
||||||
# module: webview
|
# module: packagechooserq
|
||||||
# config: owncloud.conf
|
# config: licenseq.conf
|
||||||
|
|
||||||
# Sequence section. This section describes the sequence of modules, both
|
# Sequence section. This section describes the sequence of modules, both
|
||||||
# viewmodules and jobmodules, as they should appear and/or run.
|
# viewmodules and jobmodules, as they should appear and/or run.
|
||||||
@ -116,6 +116,7 @@ sequence:
|
|||||||
- show:
|
- show:
|
||||||
- welcome
|
- welcome
|
||||||
# - notesqml
|
# - notesqml
|
||||||
|
# - packagechooserq@licenseq
|
||||||
- locale
|
- locale
|
||||||
- keyboard
|
- keyboard
|
||||||
- partition
|
- partition
|
||||||
@ -152,7 +153,6 @@ sequence:
|
|||||||
- bootloader
|
- bootloader
|
||||||
- umount
|
- umount
|
||||||
- show:
|
- show:
|
||||||
# - webview@owncloud
|
|
||||||
- finished
|
- finished
|
||||||
|
|
||||||
# A branding component is a directory, either in SHARE/calamares/branding or
|
# A branding component is a directory, either in SHARE/calamares/branding or
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
# === This file is part of Calamares - <https://calamares.io> ===
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
|
||||||
# SPDX-License-Identifier: BSD-2-Clause
|
|
||||||
#
|
|
||||||
set(CALA_WEBVIEW_LINK_LIBRARIES "")
|
|
||||||
|
|
||||||
option(WEBVIEW_FORCE_WEBKIT "Always build webview with WebKit instead of WebEngine regardless of Qt version." OFF)
|
|
||||||
|
|
||||||
set(_reason "")
|
|
||||||
|
|
||||||
message(STATUS "Found Qt version ${Qt5Core_VERSION}")
|
|
||||||
if(Qt5Core_VERSION VERSION_LESS 5.6 OR WEBVIEW_FORCE_WEBKIT)
|
|
||||||
message(STATUS " .. using webkit")
|
|
||||||
find_package(Qt5 ${QT_VERSION} CONFIG COMPONENTS WebKit WebKitWidgets)
|
|
||||||
|
|
||||||
if(Qt5WebKit_FOUND AND Qt5WebKitWidgets_FOUND)
|
|
||||||
list(APPEND CALA_WEBVIEW_INCLUDE_DIRECTORIES ${QT_QTWEBKIT_INCLUDE_DIR})
|
|
||||||
list(APPEND CALA_WEBVIEW_LINK_LIBRARIES Qt5::WebKit Qt5::WebKitWidgets)
|
|
||||||
set(WEBVIEW_WITH_WEBKIT 1)
|
|
||||||
else()
|
|
||||||
set(_reason "No suitable WebKit")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message(STATUS " .. using webengine")
|
|
||||||
find_package(Qt5 ${QT_VERSION} CONFIG COMPONENTS WebEngine WebEngineWidgets)
|
|
||||||
|
|
||||||
if(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND)
|
|
||||||
list(APPEND CALA_WEBVIEW_INCLUDE_DIRECTORIES ${QT_QTWEBENGINE_INCLUDE_DIR})
|
|
||||||
list(APPEND CALA_WEBVIEW_LINK_LIBRARIES Qt5::WebEngine Qt5::WebEngineWidgets)
|
|
||||||
set(WEBVIEW_WITH_WEBENGINE 1)
|
|
||||||
else()
|
|
||||||
set(_reason "No suitable WebEngine")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT _reason)
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/WebViewConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/WebViewConfig.h)
|
|
||||||
|
|
||||||
calamares_add_plugin(webview
|
|
||||||
TYPE viewmodule
|
|
||||||
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
|
||||||
SOURCES
|
|
||||||
WebViewStep.cpp
|
|
||||||
LINK_PRIVATE_LIBRARIES
|
|
||||||
${CALA_WEBVIEW_LINK_LIBRARIES}
|
|
||||||
SHARED_LIB
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
calamares_skip_module( "webview (${_reason})" )
|
|
||||||
endif()
|
|
@ -1,10 +0,0 @@
|
|||||||
/* SPDX-FileCopyrightText: no
|
|
||||||
SPDX-License-Identifier: CC0-1.0
|
|
||||||
*/
|
|
||||||
#ifndef CALAMARESWEBVIEWCONFIG_H
|
|
||||||
#define CALAMARESWEBVIEWCONFIG_H
|
|
||||||
|
|
||||||
#cmakedefine WEBVIEW_WITH_WEBENGINE
|
|
||||||
#cmakedefine WEBVIEW_WITH_WEBKIT
|
|
||||||
|
|
||||||
#endif // CALAMARESWEBVIEWCONFIG_H
|
|
@ -1,117 +0,0 @@
|
|||||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
|
||||||
*
|
|
||||||
* SPDX-FileCopyrightText: 2015 Rohan Garg <rohan@garg.io>
|
|
||||||
* SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
*
|
|
||||||
* Calamares is Free Software: see the License-Identifier above.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "WebViewStep.h"
|
|
||||||
|
|
||||||
#include <QVariant>
|
|
||||||
|
|
||||||
#ifdef WEBVIEW_WITH_WEBKIT
|
|
||||||
#include <QWebView>
|
|
||||||
#else
|
|
||||||
#include <QWebEngineView>
|
|
||||||
#include <QtWebEngine>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( WebViewStepFactory, registerPlugin< WebViewStep >(); )
|
|
||||||
|
|
||||||
WebViewStep::WebViewStep( QObject* parent )
|
|
||||||
: Calamares::ViewStep( parent )
|
|
||||||
{
|
|
||||||
emit nextStatusChanged( true );
|
|
||||||
#ifdef WEBVIEW_WITH_WEBENGINE
|
|
||||||
QtWebEngine::initialize();
|
|
||||||
#endif
|
|
||||||
m_view = new WebViewWidget();
|
|
||||||
#ifdef WEBVIEW_WITH_WEBKIT
|
|
||||||
m_view->settings()->setFontFamily( QWebSettings::StandardFont,
|
|
||||||
m_view->settings()->fontFamily( QWebSettings::SansSerifFont ) );
|
|
||||||
m_view->setRenderHints( QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
WebViewStep::~WebViewStep()
|
|
||||||
{
|
|
||||||
if ( m_view && m_view->parent() == nullptr )
|
|
||||||
{
|
|
||||||
m_view->deleteLater();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QString
|
|
||||||
WebViewStep::prettyName() const
|
|
||||||
{
|
|
||||||
return m_prettyName;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QWidget*
|
|
||||||
WebViewStep::widget()
|
|
||||||
{
|
|
||||||
return m_view;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
|
||||||
WebViewStep::isNextEnabled() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
|
||||||
WebViewStep::isBackEnabled() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
|
||||||
WebViewStep::isAtBeginning() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
|
||||||
WebViewStep::isAtEnd() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
WebViewStep::onActivate()
|
|
||||||
{
|
|
||||||
m_view->load( QUrl( m_url ) );
|
|
||||||
m_view->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
QList< Calamares::job_ptr >
|
|
||||||
WebViewStep::jobs() const
|
|
||||||
{
|
|
||||||
return QList< Calamares::job_ptr >();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
WebViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|
||||||
{
|
|
||||||
if ( configurationMap.contains( "url" ) && configurationMap.value( "url" ).type() == QVariant::String )
|
|
||||||
{
|
|
||||||
m_url = configurationMap.value( "url" ).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( configurationMap.contains( "prettyName" )
|
|
||||||
&& configurationMap.value( "prettyName" ).type() == QVariant::String )
|
|
||||||
{
|
|
||||||
m_prettyName = configurationMap.value( "prettyName" ).toString();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
|
||||||
*
|
|
||||||
* SPDX-FileCopyrightText: 2015 Rohan Garg <rohan@garg.io>
|
|
||||||
* SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
|
|
||||||
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
*
|
|
||||||
* Calamares is Free Software: see the License-Identifier above.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef WEBVIEWPLUGIN_H
|
|
||||||
#define WEBVIEWPLUGIN_H
|
|
||||||
|
|
||||||
#include "WebViewConfig.h"
|
|
||||||
|
|
||||||
#include "DllMacro.h"
|
|
||||||
#include "utils/PluginFactory.h"
|
|
||||||
#include "viewpages/ViewStep.h"
|
|
||||||
|
|
||||||
#include <QVariantMap>
|
|
||||||
|
|
||||||
#if defined( WEBVIEW_WITH_WEBKIT ) && defined( WEBVIEW_WITH_WEBENGINE )
|
|
||||||
#error Both WEBENGINE and WEBKIT enabled
|
|
||||||
#endif
|
|
||||||
#if !defined( WEBVIEW_WITH_WEBKIT ) && !defined( WEBVIEW_WITH_WEBENGINE )
|
|
||||||
#error Neither WEBENGINE nor WEBKIT enabled
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WEBVIEW_WITH_WEBKIT
|
|
||||||
class QWebView;
|
|
||||||
using WebViewWidget = QWebView;
|
|
||||||
#endif
|
|
||||||
#ifdef WEBVIEW_WITH_WEBENGINE
|
|
||||||
class QWebEngineView;
|
|
||||||
using WebViewWidget = QWebEngineView;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class PLUGINDLLEXPORT WebViewStep : public Calamares::ViewStep
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit WebViewStep( QObject* parent = nullptr );
|
|
||||||
~WebViewStep() override;
|
|
||||||
|
|
||||||
QString prettyName() const override;
|
|
||||||
|
|
||||||
QWidget* widget() override;
|
|
||||||
|
|
||||||
void onActivate() override;
|
|
||||||
|
|
||||||
bool isNextEnabled() const override;
|
|
||||||
bool isBackEnabled() const override;
|
|
||||||
|
|
||||||
bool isAtBeginning() const override;
|
|
||||||
bool isAtEnd() const override;
|
|
||||||
|
|
||||||
QList< Calamares::job_ptr > jobs() const override;
|
|
||||||
|
|
||||||
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
WebViewWidget* m_view;
|
|
||||||
QString m_url;
|
|
||||||
QString m_prettyName;
|
|
||||||
};
|
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( WebViewStepFactory )
|
|
||||||
|
|
||||||
#endif // WEBVIEWPLUGIN_H
|
|
@ -1,6 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: no
|
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
|
||||||
#
|
|
||||||
---
|
|
||||||
prettyName: "OwnCloud"
|
|
||||||
url: "https://owncloud.org"
|
|
@ -1,6 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: no
|
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
|
||||||
#
|
|
||||||
---
|
|
||||||
prettyName: "Webview"
|
|
||||||
url: "https://calamares.io"
|
|
Loading…
Reference in New Issue
Block a user