aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-06-21 14:52:28 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-06-23 18:58:41 +0200
commitced7d7b9e1a0cd771be36651558332e0010028bb (patch)
tree5e8c2819b230567f19fe54c765db65942fb52d2f
parent096e64ba2e866abf773f0fab3b72bf48012261f7 (diff)
PySide6: Re-add QtWebEngine, initial step
Remove module QtWebEngine. Move most API from QtWebEngineWidgets to QtWebEngineCore. Adapt imports in tests and examples. The new module QtWebEngineQuick will be added in a follow-up step. This is not functional yet as examples crash in the underlying 6.2 Alpha. Task-number: PYSIDE-1570 Change-Id: I00907e5542404560967e6ae07d102193f1f1e154 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--examples/webenginewidgets/simplebrowser/simplebrowser.py3
-rw-r--r--examples/webenginewidgets/tabbedbrowser/browsertabwidget.py4
-rw-r--r--examples/webenginewidgets/tabbedbrowser/downloadwidget.py22
-rw-r--r--examples/webenginewidgets/tabbedbrowser/findtoolbar.py2
-rw-r--r--examples/webenginewidgets/tabbedbrowser/main.py4
-rw-r--r--examples/webenginewidgets/tabbedbrowser/webengineview.py3
-rw-r--r--sources/cmake_helpers/helpers.cmake2
-rw-r--r--sources/pyside6/PySide6/QtWebEngine/CMakeLists.txt27
-rw-r--r--sources/pyside6/PySide6/QtWebEngine/typesystem_webengine.xml45
-rw-r--r--sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt23
-rw-r--r--sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml80
-rw-r--r--sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt17
-rw-r--r--sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml74
-rw-r--r--sources/pyside6/tests/QtWebEngine/CMakeLists.txt29
-rw-r--r--sources/pyside6/tests/QtWebEngine/web_engine_initialize.py52
-rw-r--r--sources/pyside6/tests/QtWebEngineCore/web_engine_custom_scheme.py8
-rw-r--r--sources/pyside6/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py4
17 files changed, 125 insertions, 274 deletions
diff --git a/examples/webenginewidgets/simplebrowser/simplebrowser.py b/examples/webenginewidgets/simplebrowser/simplebrowser.py
index 6bf487ebd..021d5311e 100644
--- a/examples/webenginewidgets/simplebrowser/simplebrowser.py
+++ b/examples/webenginewidgets/simplebrowser/simplebrowser.py
@@ -46,7 +46,8 @@ from PySide6.QtCore import QUrl
from PySide6.QtGui import QIcon
from PySide6.QtWidgets import (QApplication, QLineEdit,
QMainWindow, QPushButton, QToolBar)
-from PySide6.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
+from PySide6.QtWebEngineCore import QWebEnginePage
+from PySide6.QtWebEngineWidgets import QWebEngineView
class MainWindow(QMainWindow):
diff --git a/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py b/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py
index 397302ac1..5e87da074 100644
--- a/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py
+++ b/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py
@@ -46,7 +46,7 @@ from historywindow import HistoryWindow
from PySide6 import QtCore
from PySide6.QtCore import Qt, QUrl
from PySide6.QtWidgets import QMenu, QTabBar, QTabWidget
-from PySide6.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
+from PySide6.QtWebEngineCore import QWebEngineDownloadRequest, QWebEnginePage
class BrowserTabWidget(QTabWidget):
@@ -54,7 +54,7 @@ class BrowserTabWidget(QTabWidget):
url_changed = QtCore.Signal(QUrl)
enabled_changed = QtCore.Signal(QWebEnginePage.WebAction, bool)
- download_requested = QtCore.Signal(QWebEngineDownloadItem)
+ download_requested = QtCore.Signal(QWebEngineDownloadRequest)
def __init__(self, window_factory_function):
super().__init__()
diff --git a/examples/webenginewidgets/tabbedbrowser/downloadwidget.py b/examples/webenginewidgets/tabbedbrowser/downloadwidget.py
index 17ebd583d..aa1479eba 100644
--- a/examples/webenginewidgets/tabbedbrowser/downloadwidget.py
+++ b/examples/webenginewidgets/tabbedbrowser/downloadwidget.py
@@ -43,12 +43,12 @@ from PySide6 import QtCore
from PySide6.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl
from PySide6.QtGui import QDesktopServices
from PySide6.QtWidgets import QMenu, QProgressBar, QStyleFactory
-from PySide6.QtWebEngineWidgets import QWebEngineDownloadItem
+from PySide6.QtWebEngineCore import QWebEngineDownloadRequest
# A QProgressBar with context menu for displaying downloads in a QStatusBar.
class DownloadWidget(QProgressBar):
- """Lets you track progress of a QWebEngineDownloadItem."""
+ """Lets you track progress of a QWebEngineDownloadRequest."""
finished = QtCore.Signal()
remove_requested = QtCore.Signal()
@@ -98,13 +98,13 @@ class DownloadWidget(QProgressBar):
if total_bytes > 0:
tool_tip += f"\n{total_bytes / 1024}K"
state = self.state()
- if state == QWebEngineDownloadItem.DownloadRequested:
+ if state == QWebEngineDownloadRequest.DownloadRequested:
tool_tip += "\n(requested)"
- elif state == QWebEngineDownloadItem.DownloadInProgress:
+ elif state == QWebEngineDownloadRequest.DownloadInProgress:
tool_tip += "\n(downloading)"
- elif state == QWebEngineDownloadItem.DownloadCompleted:
+ elif state == QWebEngineDownloadRequest.DownloadCompleted:
tool_tip += "\n(completed)"
- elif state == QWebEngineDownloadItem.DownloadCancelled:
+ elif state == QWebEngineDownloadRequest.DownloadCancelled:
tool_tip += "\n(cancelled)"
else:
tool_tip += "\n(interrupted)"
@@ -121,20 +121,20 @@ class DownloadWidget(QProgressBar):
DownloadWidget.open_file(self._download_item.path())
def mouseDoubleClickEvent(self, event):
- if self.state() == QWebEngineDownloadItem.DownloadCompleted:
+ if self.state() == QWebEngineDownloadRequest.DownloadCompleted:
self._launch()
def contextMenuEvent(self, event):
state = self.state()
context_menu = QMenu()
launch_action = context_menu.addAction("Launch")
- launch_action.setEnabled(state == QWebEngineDownloadItem.DownloadCompleted)
+ launch_action.setEnabled(state == QWebEngineDownloadRequest.DownloadCompleted)
show_in_folder_action = context_menu.addAction("Show in Folder")
- show_in_folder_action.setEnabled(state == QWebEngineDownloadItem.DownloadCompleted)
+ show_in_folder_action.setEnabled(state == QWebEngineDownloadRequest.DownloadCompleted)
cancel_action = context_menu.addAction("Cancel")
- cancel_action.setEnabled(state == QWebEngineDownloadItem.DownloadInProgress)
+ cancel_action.setEnabled(state == QWebEngineDownloadRequest.DownloadInProgress)
remove_action = context_menu.addAction("Remove")
- remove_action.setEnabled(state != QWebEngineDownloadItem.DownloadInProgress)
+ remove_action.setEnabled(state != QWebEngineDownloadRequest.DownloadInProgress)
chosen_action = context_menu.exec(event.globalPos())
if chosen_action == launch_action:
diff --git a/examples/webenginewidgets/tabbedbrowser/findtoolbar.py b/examples/webenginewidgets/tabbedbrowser/findtoolbar.py
index c6668babc..c38f01afa 100644
--- a/examples/webenginewidgets/tabbedbrowser/findtoolbar.py
+++ b/examples/webenginewidgets/tabbedbrowser/findtoolbar.py
@@ -42,7 +42,7 @@ from PySide6 import QtCore
from PySide6.QtCore import Qt
from PySide6.QtGui import QIcon, QKeySequence
from PySide6.QtWidgets import QCheckBox, QLineEdit, QToolBar, QToolButton
-from PySide6.QtWebEngineWidgets import QWebEnginePage
+from PySide6.QtWebEngineCore import QWebEnginePage
# A Find tool bar (bottom area)
diff --git a/examples/webenginewidgets/tabbedbrowser/main.py b/examples/webenginewidgets/tabbedbrowser/main.py
index f2280c273..400a87540 100644
--- a/examples/webenginewidgets/tabbedbrowser/main.py
+++ b/examples/webenginewidgets/tabbedbrowser/main.py
@@ -52,7 +52,7 @@ from PySide6.QtCore import Qt, QUrl
from PySide6.QtGui import QAction, QKeySequence, QIcon
from PySide6.QtWidgets import (QApplication, QDockWidget, QLabel,
QLineEdit, QMainWindow, QToolBar)
-from PySide6.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
+from PySide6.QtWebEngineCore import QWebEngineDownloadRequest, QWebEnginePage
main_windows = []
@@ -61,7 +61,7 @@ def create_main_window():
"""Creates a MainWindow using 75% of the available screen resolution."""
main_win = MainWindow()
main_windows.append(main_win)
- available_geometry = app.desktop().availableGeometry(main_win)
+ available_geometry = main_win.screen().availableGeometry()
main_win.resize(available_geometry.width() * 2 / 3,
available_geometry.height() * 2 / 3)
main_win.show()
diff --git a/examples/webenginewidgets/tabbedbrowser/webengineview.py b/examples/webenginewidgets/tabbedbrowser/webengineview.py
index e12567df3..19a16e8d3 100644
--- a/examples/webenginewidgets/tabbedbrowser/webengineview.py
+++ b/examples/webenginewidgets/tabbedbrowser/webengineview.py
@@ -38,7 +38,8 @@
##
#############################################################################
-from PySide6.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
+from PySide6.QtWebEngineCore import QWebEnginePage
+from PySide6.QtWebEngineWidgets import QWebEngineView
from PySide6 import QtCore
diff --git a/sources/cmake_helpers/helpers.cmake b/sources/cmake_helpers/helpers.cmake
index beba25c74..0f600d870 100644
--- a/sources/cmake_helpers/helpers.cmake
+++ b/sources/cmake_helpers/helpers.cmake
@@ -48,7 +48,7 @@ endif()
if(WIN32)
list(APPEND ALL_OPTIONAL_MODULES AxContainer)
endif()
-list(APPEND ALL_OPTIONAL_MODULES WebChannel WebEngineCore WebEngine WebEngineWidgets WebSockets)
+list(APPEND ALL_OPTIONAL_MODULES WebChannel WebEngineCore WebEngineWidgets WebSockets)
if (Qt${QT_MAJOR_VERSION}Core_VERSION VERSION_GREATER 6.0.2)
list(APPEND ALL_OPTIONAL_MODULES 3DCore 3DRender 3DInput 3DLogic 3DAnimation 3DExtras)
endif()
diff --git a/sources/pyside6/PySide6/QtWebEngine/CMakeLists.txt b/sources/pyside6/PySide6/QtWebEngine/CMakeLists.txt
deleted file mode 100644
index 1c31eb0c7..000000000
--- a/sources/pyside6/PySide6/QtWebEngine/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-project(QtWebEngine)
-
-set(QtWebEngine_SRC
-${QtWebEngine_GEN_DIR}/qtwebengine_wrapper.cpp
-# module is always needed
-${QtWebEngine_GEN_DIR}/qtwebengine_module_wrapper.cpp
-)
-
-set(QtWebEngine_include_dirs
- ${QtWebEngine_SOURCE_DIR}
- ${QtWebEngine_BINARY_DIR}
- ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
- ${libpyside_SOURCE_DIR}
- ${QtCore_GEN_DIR}
- )
-set(QtWebEngine_libraries pyside6
- ${Qt${QT_MAJOR_VERSION}WebEngine_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
- )
-set(QtWebEngine_deps QtCore)
-create_pyside_module(NAME QtWebEngine
- INCLUDE_DIRS QtWebEngine_include_dirs
- LIBRARIES QtWebEngine_libraries
- DEPS QtWebEngine_deps
- TYPESYSTEM_PATH QtWebEngine_SOURCE_DIR
- SOURCES QtWebEngine_SRC)
-
diff --git a/sources/pyside6/PySide6/QtWebEngine/typesystem_webengine.xml b/sources/pyside6/PySide6/QtWebEngine/typesystem_webengine.xml
deleted file mode 100644
index 7801e97a7..000000000
--- a/sources/pyside6/PySide6/QtWebEngine/typesystem_webengine.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
--->
-<typesystem package="PySide6.QtWebEngine">
- <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
- <namespace-type name="QtWebEngine"/>
-</typesystem>
diff --git a/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt b/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt
index bb61bf8e2..f79dd762d 100644
--- a/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtWebEngineCore/CMakeLists.txt
@@ -1,8 +1,20 @@
project(QtWebEngineCore)
set(QtWebEngineCore_SRC
+${QtWebEngineCore_GEN_DIR}/qwebenginecertificateerror_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginecontextmenurequest_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginecookiestore_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginedownloadrequest_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginefullscreenrequest_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginehistory_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginehistoryitem_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginehistorymodel_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebenginehttprequest_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginepage_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebengineprofile_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginescript_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginescriptcollection_wrapper.cpp
+${QtWebEngineCore_GEN_DIR}/qwebenginesettings_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestinfo_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestinterceptor_wrapper.cpp
${QtWebEngineCore_GEN_DIR}/qwebengineurlrequestjob_wrapper.cpp
@@ -16,17 +28,26 @@ set(QtWebEngineCore_include_dirs
${QtWebEngineCore_SOURCE_DIR}
${QtWebEngineCore_BINARY_DIR}
${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}PrintSupport_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
+ ${QtGui_GEN_DIR}
+ ${QtWidgets_GEN_DIR}
${QtNetwork_GEN_DIR}
+ ${QtPrintSupport_GEN_DIR}
)
set(QtWebEngineCore_libraries pyside6
${Qt${QT_MAJOR_VERSION}WebEngineCore_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}PrintSupport_LIBRARIES}
)
-set(QtWebEngineCore_deps QtCore QtNetwork)
+set(QtWebEngineCore_deps QtCore QtGui QtNetwork QtPrintSupport)
create_pyside_module(NAME QtWebEngineCore
INCLUDE_DIRS QtWebEngineCore_include_dirs
LIBRARIES QtWebEngineCore_libraries
diff --git a/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml b/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml
index b24fd4729..ff1e66c10 100644
--- a/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml
+++ b/sources/pyside6/PySide6/QtWebEngineCore/typesystem_webenginecore.xml
@@ -41,17 +41,87 @@
-->
<typesystem package="PySide6.QtWebEngineCore">
<load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
+ <load-typesystem name="QtPrintSupport/typesystem_printsupport.xml" generate="no"/>
<object-type name="QWebEngineCookieStore"/>
+ <object-type name="QWebEngineCertificateError">
+ <enum-type name="Type"/>
+ </object-type>
+
+ <object-type name="QWebEngineContextMenuRequest">
+ <enum-type name="EditFlag" flags="EditFlags"/>
+ <enum-type name="MediaFlag" flags="MediaFlags"/>
+ <enum-type name="MediaType"/>
+ </object-type>
+
+ <object-type name="QWebEngineDownloadRequest">
+ <enum-type name="DownloadInterruptReason"/>
+ <enum-type name="DownloadState"/>
+ <enum-type name="SavePageFormat"/>
+ </object-type>
+
+ <object-type name="QWebEngineFullScreenRequest"/>
+
+ <object-type name="QWebEngineHistory"/>
+ <value-type name="QWebEngineHistoryItem">
+ <!-- No default constructor -->
+ <modify-function signature="swap(QWebEngineHistoryItem&amp;)" remove="all"/>
+ </value-type>
+ <object-type name="QWebEngineHistoryModel">
+ <enum-type name="Roles"/>
+ </object-type>
+
+ <object-type name="QWebEnginePage">
+ <enum-type name="LifecycleState"/>
+ <enum-type name="WebAction"/>
+ <enum-type name="FindFlag" flags="FindFlags"/>
+ <enum-type name="WebWindowType"/>
+ <enum-type name="PermissionPolicy"/>
+ <enum-type name="NavigationType"/>
+ <enum-type name="Feature"/>
+ <enum-type name="FileSelectionMode"/>
+ <enum-type name="JavaScriptConsoleMessageLevel"/>
+ <enum-type name="RenderProcessTerminationStatus"/>
+ <add-function signature="findText(const QString &amp;,QWebEnginePage::FindFlags,PyObject*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-findtext"/>
+ </add-function>
+ <add-function signature="toPlainText(PyObject*) const">
+ <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-convertto"/>
+ </add-function>
+ <add-function signature="toHtml(PyObject*) const">
+ <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-convertto"/>
+ </add-function>
+ <add-function signature="runJavaScript(const QString &amp;,quint32,PyObject*)">
+ <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-runjavascript"/>
+ </add-function>
+ </object-type>
+
+ <object-type name="QWebEngineProfile">
+ <enum-type name="HttpCacheType"/>
+ <enum-type name="PersistentCookiesPolicy"/>
+ <!-- FIXME Left-over deprecated API, pending fix in qtwebengine repo -->
+ <modify-function signature="setRequestInterceptor(QWebEngineUrlRequestInterceptor*)" remove="all"/>
+ </object-type>
+
+ <value-type name="QWebEngineScript">
+ <enum-type name="InjectionPoint"/>
+ <enum-type name="ScriptWorldId"/>
+ </value-type>
+
+ <object-type name="QWebEngineScriptCollection"/>
+
+ <object-type name="QWebEngineSettings">
+ <enum-type name="FontFamily"/>
+ <enum-type name="FontSize"/>
+ <enum-type name="UnknownUrlSchemePolicy" since="5.11"/>
+ <enum-type name="WebAttribute"/>
+ </object-type>
+
<object-type name="QWebEngineHttpRequest">
<enum-type name="Method"/>
- <modify-function signature="QWebEngineHttpRequest(const QUrl &amp;, const QWebEngineHttpRequest::Method &amp;)">
- <modify-argument index="2">
- <replace-type modified-type="QWebEngineHttpRequest::Method"/>
- </modify-argument>
- </modify-function>
</object-type>
<object-type name="QWebEngineUrlRequestInfo">
diff --git a/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt b/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt
index 7c61df812..5cbfa912d 100644
--- a/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtWebEngineWidgets/CMakeLists.txt
@@ -1,18 +1,7 @@
project(QtWebEngineWidgets)
set(QtWebEngineWidgets_SRC
-${QtWebEngineWidgets_GEN_DIR}/qwebenginecertificateerror_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginedownloaditem_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginehistory_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginehistoryitem_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginepage_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebengineprofile_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginescript_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginescriptcollection_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginesettings_wrapper.cpp
${QtWebEngineWidgets_GEN_DIR}/qwebengineview_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginecontextmenudata_wrapper.cpp
-${QtWebEngineWidgets_GEN_DIR}/qwebenginefullscreenrequest_wrapper.cpp
# module is always needed
${QtWebEngineWidgets_GEN_DIR}/qtwebenginewidgets_module_wrapper.cpp
)
@@ -24,7 +13,7 @@ set(QtWebEngineWidgets_include_dirs
${Qt${QT_MAJOR_VERSION}Gui_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Widgets_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
- ${Qt${QT_MAJOR_VERSION}WebChannel_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}PrintSupport_INCLUDE_DIRS}
${Qt${QT_MAJOR_VERSION}WebEngineWidgets_INCLUDE_DIRS}
${libpyside_SOURCE_DIR}
${QtCore_GEN_DIR}
@@ -32,20 +21,18 @@ set(QtWebEngineWidgets_include_dirs
${QtWidgets_GEN_DIR}
${QtWebEngineWidgets_GEN_DIR}
${QtNetwork_GEN_DIR}
- ${QtWebChannel_GEN_DIR}
${QtWebEngineCore_GEN_DIR}
${QtPrintSupport_GEN_DIR}
)
set(QtWebEngineWidgets_libraries pyside6
${Qt${QT_MAJOR_VERSION}WebEngineWidgets_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
- ${Qt${QT_MAJOR_VERSION}WebChannel_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Widgets_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Gui_LIBRARIES}
${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
${Qt${QT_MAJOR_VERSION}PrintSupport_LIBRARIES}
)
-set(QtWebEngineWidgets_deps QtGui QtWidgets QtNetwork QtWebChannel QtPrintSupport)
+set(QtWebEngineWidgets_deps QtGui QtWidgets QtNetwork QtPrintSupport)
create_pyside_module(NAME QtWebEngineWidgets
INCLUDE_DIRS QtWebEngineWidgets_include_dirs
LIBRARIES QtWebEngineWidgets_libraries
diff --git a/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml b/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml
index 8feb541ad..8eb7e2f6f 100644
--- a/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml
+++ b/sources/pyside6/PySide6/QtWebEngineWidgets/typesystem_webenginewidgets.xml
@@ -44,87 +44,13 @@
<load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/>
<load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/>
<load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>
- <load-typesystem name="QtWebChannel/typesystem_webchannel.xml" generate="no"/>
<load-typesystem name="QtWebEngineCore/typesystem_webenginecore.xml" generate="no"/>
<load-typesystem name="QtPrintSupport/typesystem_printsupport.xml" generate="no"/>
-
- <object-type name="QWebEngineCertificateError">
- <enum-type name="Error"/>
- </object-type>
-
- <object-type name="QWebEngineDownloadItem">
- <enum-type name="DownloadInterruptReason"/>
- <enum-type name="DownloadState"/>
- <enum-type name="DownloadType"/>
- <enum-type name="SavePageFormat"/>
- </object-type>
-
- <object-type name="QWebEngineHistory"/>
- <value-type name="QWebEngineHistoryItem"/>
-
- <object-type name="QWebEnginePage">
- <enum-type name="LifecycleState"/>
- <enum-type name="WebAction"/>
- <enum-type name="FindFlag" flags="FindFlags"/>
- <enum-type name="WebWindowType"/>
- <enum-type name="PermissionPolicy"/>
- <enum-type name="NavigationType"/>
- <enum-type name="Feature"/>
- <enum-type name="FileSelectionMode"/>
- <enum-type name="JavaScriptConsoleMessageLevel"/>
- <enum-type name="RenderProcessTerminationStatus"/>
- <add-function signature="findText(const QString &amp;,QWebEnginePage::FindFlags,PyObject*)">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-findtext"/>
- </add-function>
- <add-function signature="print(QPrinter*,PyObject*)">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-print"/>
- </add-function>
- <add-function signature="toPlainText(PyObject*) const">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-convertto"/>
- </add-function>
- <add-function signature="toHtml(PyObject*) const">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-convertto"/>
- </add-function>
- <add-function signature="runJavaScript(const QString &amp;,quint32,PyObject*)">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-runjavascript"/>
- </add-function>
- <add-function signature="printToPdf(PyObject*,const QPageLayout &amp;)">
- <inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-printtopdf"/>
- </add-function>
- </object-type>
-
- <object-type name="QWebEngineProfile">
- <enum-type name="HttpCacheType"/>
- <enum-type name="PersistentCookiesPolicy"/>
- </object-type>
-
- <value-type name="QWebEngineScript">
- <enum-type name="InjectionPoint"/>
- <enum-type name="ScriptWorldId"/>
- </value-type>
-
- <object-type name="QWebEngineScriptCollection"/>
-
- <object-type name="QWebEngineSettings">
- <enum-type name="FontFamily"/>
- <enum-type name="FontSize"/>
- <enum-type name="UnknownUrlSchemePolicy" since="5.11"/>
- <enum-type name="WebAttribute"/>
- </object-type>
-
<object-type name="QWebEngineView">
<add-function signature="findText(const QString &amp;,QWebEnginePage::FindFlags,PyObject*)">
<inject-code class="target" position="beginning" file="../glue/qtwebenginewidgets.cpp" snippet="qwebenginepage-findtext"/>
</add-function>
</object-type>
- <value-type name="QWebEngineContextMenuData">
- <enum-type name="EditFlag" flags="EditFlags" since="5.11"/>
- <enum-type name="MediaFlag" flags="MediaFlags" since="5.11"/>
- <enum-type name="MediaType"/>
- </value-type>
-
- <object-type name="QWebEngineFullScreenRequest"/>
-
</typesystem>
diff --git a/sources/pyside6/tests/QtWebEngine/CMakeLists.txt b/sources/pyside6/tests/QtWebEngine/CMakeLists.txt
deleted file mode 100644
index 0e85a698e..000000000
--- a/sources/pyside6/tests/QtWebEngine/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-PYSIDE_TEST(web_engine_initialize.py)
diff --git a/sources/pyside6/tests/QtWebEngine/web_engine_initialize.py b/sources/pyside6/tests/QtWebEngine/web_engine_initialize.py
deleted file mode 100644
index be9ac0e40..000000000
--- a/sources/pyside6/tests/QtWebEngine/web_engine_initialize.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-import os
-import sys
-import unittest
-
-from pathlib import Path
-sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
-from init_paths import init_test_paths
-init_test_paths(False)
-
-from PySide6.QtCore import QTimer
-from PySide6.QtWebEngine import QtWebEngine
-from PySide6.QtWidgets import QApplication
-
-
-class MainTest(unittest.TestCase):
- def test_initializePresent(self):
- app = QApplication([])
- QtWebEngine.initialize()
- QTimer.singleShot(2000, app.quit)
- app.exec()
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/sources/pyside6/tests/QtWebEngineCore/web_engine_custom_scheme.py b/sources/pyside6/tests/QtWebEngineCore/web_engine_custom_scheme.py
index ab1c4f706..ed353887e 100644
--- a/sources/pyside6/tests/QtWebEngineCore/web_engine_custom_scheme.py
+++ b/sources/pyside6/tests/QtWebEngineCore/web_engine_custom_scheme.py
@@ -37,9 +37,9 @@ init_test_paths(False)
from PySide6.QtCore import QBuffer, Qt, QTimer
from PySide6.QtWidgets import QApplication, QWidget, QVBoxLayout
-from PySide6.QtWebEngine import QtWebEngine
-from PySide6.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile
-from PySide6.QtWebEngineCore import (QWebEngineUrlScheme,
+from PySide6.QtWebEngineWidgets import QWebEngineView
+from PySide6.QtWebEngineCore import (QWebEngineProfile,
+ QWebEngineUrlScheme,
QWebEngineUrlSchemeHandler)
@@ -59,8 +59,6 @@ class MainTest(unittest.TestCase):
def test_SchemeHandlerRedirect(self):
self._loaded = False
QApplication.setAttribute(Qt.AA_ShareOpenGLContexts)
- QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
- QtWebEngine.initialize()
app = QApplication([])
scheme_name = bytes("testpy", "UTF-8")
diff --git a/sources/pyside6/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py b/sources/pyside6/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py
index 7eef5c059..d65975053 100644
--- a/sources/pyside6/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py
+++ b/sources/pyside6/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py
@@ -39,13 +39,13 @@ init_test_paths(False)
from PySide6.QtCore import QCoreApplication, QSize, QUrl, Qt
from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget
-from PySide6.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
+from PySide6.QtWebEngineCore import QWebEnginePage
+from PySide6.QtWebEngineWidgets import QWebEngineView
class MainTest(unittest.TestCase):
def test_WebEngineView_findText_exists(self):
- QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
app = QApplication.instance() or QApplication()
top_level = QWidget()
layout = QVBoxLayout(top_level)