summaryrefslogtreecommitdiffstats
diff options
authorTarja Sundqvist <tarja.sundqvist@qt.io>2025-01-16 20:54:09 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2025-01-16 20:54:09 +0200
commita62a93331ff59e762b0f7d26051a8cb6afdd2ce5 (patch)
tree6745bacbe14b85a4d81000e8770d34a248165dea
parent77c4670a926c461d182db33242edac779f9e44d2 (diff)
parent45c01c6e389f639948db46d627b0b378565aeda6 (diff)
Merge branch 'tqtc/lts-6.2-opensource' into 6.2.116.2.11
-rw-r--r--.cmake.conf4
-rw-r--r--cmake/Functions.cmake5
-rw-r--r--coin/module_config.yaml1
-rw-r--r--configure.cmake2
-rw-r--r--dependencies.yaml8
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--examples/webenginequick/quicknanobrowser/BrowserWindow.qml2
-rw-r--r--examples/webenginewidgets/CMakeLists.txt3
-rw-r--r--examples/webenginewidgets/clientcertificate/CMakeLists.txt60
-rw-r--r--examples/webenginewidgets/clientcertificate/client.cpp67
-rw-r--r--examples/webenginewidgets/clientcertificate/client.pro10
-rw-r--r--examples/webenginewidgets/clientcertificate/clientcertificate.pro7
-rw-r--r--examples/webenginewidgets/clientcertificate/doc/images/granted.pngbin5031 -> 0 bytes
-rw-r--r--examples/webenginewidgets/clientcertificate/doc/images/selection.pngbin6300 -> 0 bytes
-rw-r--r--examples/webenginewidgets/clientcertificate/doc/src/clientcertificate.qdoc160
-rw-r--r--examples/webenginewidgets/clientcertificate/resources/ca.pem24
-rw-r--r--examples/webenginewidgets/clientcertificate/resources/client.key27
-rw-r--r--examples/webenginewidgets/clientcertificate/resources/client.pem22
-rw-r--r--examples/webenginewidgets/clientcertificate/resources/client.qrc6
-rw-r--r--examples/webenginewidgets/clientcertificate/resources/server.key27
-rw-r--r--examples/webenginewidgets/clientcertificate/resources/server.pem22
-rw-r--r--examples/webenginewidgets/clientcertificate/resources/server.qrc7
-rw-r--r--examples/webenginewidgets/clientcertificate/server.cpp99
-rw-r--r--examples/webenginewidgets/clientcertificate/server.pro11
-rw-r--r--examples/webenginewidgets/simplebrowser/browser.cpp6
-rw-r--r--examples/webenginewidgets/simplebrowser/browserwindow.cpp15
-rw-r--r--examples/webenginewidgets/simplebrowser/downloadwidget.cpp6
-rw-r--r--examples/webenginewidgets/simplebrowser/main.cpp10
-rw-r--r--examples/webenginewidgets/simplebrowser/tabwidget.cpp8
-rw-r--r--examples/webenginewidgets/simplebrowser/webview.cpp9
-rw-r--r--examples/webenginewidgets/webenginewidgets.pro2
-rw-r--r--src/core/browser_accessibility_qt.cpp6
-rw-r--r--src/core/compositor/native_skia_output_device_mac.mm2
-rw-r--r--src/core/doc/about_credits_entry.tmpl3
-rw-r--r--src/core/doc/src/qtwebengine-deploying.qdoc4
-rw-r--r--src/core/doc/src/qwebengine-licensing.qdoc3
-rw-r--r--src/core/web_engine_context.cpp50
-rw-r--r--src/host/CMakeLists.txt2
-rw-r--r--src/pdf/CMakeLists.txt2
-rw-r--r--src/pdf/doc/about_credits_entry.tmpl3
-rw-r--r--src/pdf/doc/images/multipageviewer.pngbin39637 -> 55795 bytes
-rw-r--r--src/pdf/qpdfbookmarkmodel.cpp4
-rw-r--r--src/webenginewidgets/api/qwebengineview.h1
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/auto/core/CMakeLists.txt2
-rw-r--r--tests/auto/core/certificateerror/tst_certificateerror.cpp1
-rw-r--r--tests/auto/httpserver/httpserver.cpp3
-rw-r--r--tests/auto/httpserver/httpsserver.h71
-rw-r--r--tests/auto/quick/qmltests/tst_qmltests.cpp2
-rw-r--r--tests/auto/widgets/accessibility/tst_accessibility.cpp53
-rw-r--r--tests/manual/quick/touchbrowser/touchmockingapplication.cpp32
51 files changed, 184 insertions, 696 deletions
diff --git a/.cmake.conf b/.cmake.conf
index e710307cd..e019b1f82 100644
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -1,3 +1,3 @@
-set(QT_REPO_MODULE_VERSION "6.5.4")
-set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
+set(QT_REPO_MODULE_VERSION "6.2.11")
+set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "")
set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_WEBENGINE "3.19")
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake
index fa05bfbdf..f8bcf9a9a 100644
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -1053,6 +1053,11 @@ macro(append_sanitizer_setup)
ARGS is_ubsan is_ubsan_vptr
CONDITION undefined IN_LIST ECM_ENABLE_SANITIZERS
)
+ if(MACOS)
+ list(APPEND gnArgArg
+ clang_version="${QT_COMPILER_VERSION_MAJOR}.${QT_COMPILER_VERSION_MINOR}.${QT_COMPILER_VERSION_PATCH}"
+ )
+ endif()
endif()
endmacro()
diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index f1d69a277..61ce9a525 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -1,4 +1,5 @@
version: 2
+alias: qtwebengine
accept_configuration:
condition: property
property: features
diff --git a/configure.cmake b/configure.cmake
index 83cc0e4c9..ed6f8d1f2 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -251,7 +251,7 @@ qt_feature("qtwebengine-quick-build" PRIVATE
qt_feature("qtpdf-build" PUBLIC
LABEL "Build Qt PDF"
PURPOSE "Enables building the Qt Pdf modules."
- CONDITION Qt6Core_VERSION VERSION_GREATER_EQUAL "6.3"
+ CONDITION Qt6Core_VERSION VERSION_GREATER_EQUAL "6.3.0"
)
qt_feature("qtpdf-widgets-build" PRIVATE
LABEL "Build QtPdfWidgets"
diff --git a/dependencies.yaml b/dependencies.yaml
index b67557c57..756331732 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
dependencies:
../tqtc-qtdeclarative:
- ref: 533a9a8afcc56635bed5da93102028e01fa708c0
+ ref: 3d6ea255dba81dd08532d56d4af6a56cb71940aa
required: true
../tqtc-qtpositioning:
- ref: a619623a4949071ddf7392d26b916890a751e965
+ ref: e813030505e557d267ace2402192e13b2fb049ac
required: false
../tqtc-qttools:
- ref: 8be3e6cff9903e7db610c185aad1b598cce0368c
+ ref: 3818cdf1a1e511aa2bb9fab9347af7b7d9829d90
required: false
../tqtc-qtwebchannel:
- ref: c772de714a2e8dec516c380a222ec58ad92459fc
+ ref: dce5931854e827e049e72ad83b6945a32be7115a
required: false
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index f3b098d0b..2d3ccab7e 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16)
qt_examples_build_begin(EXTERNAL_BUILD)
-if(NOT CMAKE_CROSSCOMPILING AND Qt6Core_VERSION VERSION_GREATER_EQUAL "6.5") #QTBUG-86533
+if(NOT CMAKE_CROSSCOMPILING) #QTBUG-86533
if(TARGET Qt::WebEngineCore)
add_subdirectory(webenginequick)
endif()
diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index d5ae19f54..9c257de3c 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -1,7 +1,7 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtCore
+import Qt.labs.settings
import QtQml
import QtQuick
import QtQuick.Controls.Fusion
diff --git a/examples/webenginewidgets/CMakeLists.txt b/examples/webenginewidgets/CMakeLists.txt
index cc4a4d6c0..07ffa9bc4 100644
--- a/examples/webenginewidgets/CMakeLists.txt
+++ b/examples/webenginewidgets/CMakeLists.txt
@@ -21,6 +21,3 @@ if(QT_FEATURE_webengine_spellchecker AND NOT CMAKE_CROSSCOMPILING
AND NOT QT_FEATURE_webengine_native_spellchecker AND NOT WIN32)
qt_internal_add_example(spellchecker)
endif()
-if(QT_FEATURE_ssl)
- qt_internal_add_example(clientcertificate)
-endif()
diff --git a/examples/webenginewidgets/clientcertificate/CMakeLists.txt b/examples/webenginewidgets/clientcertificate/CMakeLists.txt
deleted file mode 100644
index 8878bb7da..000000000
--- a/examples/webenginewidgets/clientcertificate/CMakeLists.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: BSD-3-Clause
-
-cmake_minimum_required(VERSION 3.16)
-project(clientcertificate LANGUAGES CXX)
-
-set(CMAKE_AUTOMOC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webenginewidgets/clientcertificate")
-
-find_package(Qt6 REQUIRED COMPONENTS Core Gui WebEngineWidgets)
-
-qt_add_executable(server
- server.cpp
-)
-
-qt_add_executable(client
- client.cpp
-)
-
-set_target_properties(client PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-
-qt_add_resources(client "client"
- PREFIX
- "/"
- FILES
- "resources/client.pem"
- "resources/client.key"
-)
-
-qt_add_resources(server "server"
- PREFIX
- "/"
- FILES
- "resources/server.pem"
- "resources/server.key"
- "resources/ca.pem"
-)
-
-target_link_libraries(client PUBLIC
- Qt::WebEngineWidgets
-)
-
-target_link_libraries(server PUBLIC
- Qt::Core
- Qt::Network
-)
-
-install(TARGETS server client
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/webenginewidgets/clientcertificate/client.cpp b/examples/webenginewidgets/clientcertificate/client.cpp
deleted file mode 100644
index 1227fa28e..000000000
--- a/examples/webenginewidgets/clientcertificate/client.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#include <QtCore/qfile.h>
-#include <QtNetwork/qsslkey.h>
-#include <QtWebEngineCore/qwebenginecertificateerror.h>
-#include <QtWebEngineCore/qwebengineclientcertificatestore.h>
-#include <QtWebEngineCore/qwebengineprofile.h>
-#include <QtWebEngineCore/qwebenginepage.h>
-#include <QtWebEngineWidgets/qwebengineview.h>
-#include <QtWidgets/qapplication.h>
-#include <QtWidgets/qdialog.h>
-#include <QtWidgets/qlabel.h>
-#include <QtWidgets/qlistwidget.h>
-#include <QtWidgets/qpushbutton.h>
-#include <QtWidgets/qboxlayout.h>
-
-int main(int argc, char *argv[])
-{
- QCoreApplication::setOrganizationName("QtExamples");
- QApplication app(argc, argv);
-
- QFile certFile(":/resources/client.pem");
- certFile.open(QIODevice::ReadOnly);
- const QSslCertificate cert(certFile.readAll(), QSsl::Pem);
-
- QFile keyFile(":/resources/client.key");
- keyFile.open(QIODevice::ReadOnly);
- const QSslKey sslKey(keyFile.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, "");
-
- QWebEngineProfile::defaultProfile()->clientCertificateStore()->add(cert, sslKey);
-
- QWebEnginePage page;
- QObject::connect(&page, &QWebEnginePage::certificateError,
- [](QWebEngineCertificateError e) { e.acceptCertificate(); });
-
- QObject::connect(
- &page, &QWebEnginePage::selectClientCertificate, &page,
- [&cert](QWebEngineClientCertificateSelection selection) {
- QDialog dialog;
- QVBoxLayout *layout = new QVBoxLayout;
- QLabel *label = new QLabel(QLatin1String("Select certificate"));
- QListWidget *listWidget = new QListWidget;
- listWidget->setSelectionMode(QAbstractItemView::SingleSelection);
- QPushButton *button = new QPushButton(QLatin1String("Select"));
- layout->addWidget(label);
- layout->addWidget(listWidget);
- layout->addWidget(button);
- QObject::connect(button, &QPushButton::clicked, [&dialog]() { dialog.accept(); });
- const QList<QSslCertificate> &list = selection.certificates();
- for (const QSslCertificate &cert : list) {
- listWidget->addItem(cert.subjectDisplayName() + " : " + cert.serialNumber());
- }
- dialog.setLayout(layout);
- if (dialog.exec() == QDialog::Accepted)
- selection.select(list[listWidget->currentRow()]);
- else
- selection.selectNone();
- });
-
- QWebEngineView view(&page);
- view.setUrl(QUrl("https://localhost:5555"));
- view.resize(800, 600);
- view.show();
-
- return app.exec();
-}
diff --git a/examples/webenginewidgets/clientcertificate/client.pro b/examples/webenginewidgets/clientcertificate/client.pro
deleted file mode 100644
index e397d5efa..000000000
--- a/examples/webenginewidgets/clientcertificate/client.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = app
-
-QT += webenginewidgets
-
-SOURCES += client.cpp
-
-RESOURCES += resources/client.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/clientcertificate/client
-INSTALLS += target
diff --git a/examples/webenginewidgets/clientcertificate/clientcertificate.pro b/examples/webenginewidgets/clientcertificate/clientcertificate.pro
deleted file mode 100644
index 66039d05c..000000000
--- a/examples/webenginewidgets/clientcertificate/clientcertificate.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-QT_FOR_CONFIG += network-private
-TEMPLATE = subdirs
-
-client.file = client.pro
-server.file = server.pro
-
-qtConfig(ssl): SUBDIRS += client server
diff --git a/examples/webenginewidgets/clientcertificate/doc/images/granted.png b/examples/webenginewidgets/clientcertificate/doc/images/granted.png
deleted file mode 100644
index b2def9b5e..000000000
--- a/examples/webenginewidgets/clientcertificate/doc/images/granted.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginewidgets/clientcertificate/doc/images/selection.png b/examples/webenginewidgets/clientcertificate/doc/images/selection.png
deleted file mode 100644
index 2756ac7be..000000000
--- a/examples/webenginewidgets/clientcertificate/doc/images/selection.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginewidgets/clientcertificate/doc/src/clientcertificate.qdoc b/examples/webenginewidgets/clientcertificate/doc/src/clientcertificate.qdoc
deleted file mode 100644
index c5440f08f..000000000
--- a/examples/webenginewidgets/clientcertificate/doc/src/clientcertificate.qdoc
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
-
-/*!
- \example webenginewidgets/clientcertificate
- \examplecategory {Web Technologies}
- \title WebEngine Widgets Client Certificate Example
- \ingroup webengine-widgetexamples
- \brief A simple client certificate authentication scenario using \QWE and \l QSslServer.
-
- \image selection.png
-
- In this example we are going to show a client certificate authentication workflow.
- The presented authentication scenario can be for example implemented
- for an embedded device, which provides a web interface to handle its functionality.
- The administrator uses the \QWE powered client to maintain the embedded device
- and has a custom SSL certificate to authenticate.
- The connection is encrypted with SSL sockets. The embedded device uses
- a \c QSslSocket to handle the authentication and the encryption. This way the
- administrator does not have to enter any credentials and just needs to select
- a proper certificate that is recognized by the device.
-
- In the example we focus on a very simple and minimalistic approach to demonstrate
- the workflow. Note that QSslSocket is a low level solution as we do not have to
- run a full-blown HTTPS server on the resource limited embedded device.
-
- \section1 Creating Certificates
-
- The example comes with certificates already generated, but let's see how to generate
- new ones. We create certificates for the server and the client using
- \l{https://www.openssl.org}{OpenSSL tooling}.
-
- First, we create the certificate signing request \c CSR and sign it. We will use
- a CA private key to sign and issue both local certificates for the client and the server.
-
- \badcode
- openssl req -out ca.pem -new -x509 -nodes -keyout ca.key
- \endcode
-
- \note Specify the \c {-days} option to override the default certificate validity of 30 days.
-
- Now, let's create two private keys for our client and a server:
-
- \badcode
- openssl genrsa -out client.key 2048
- \endcode
- \badcode
- openssl genrsa -out server.key 2048
- \endcode
-
- Next we need two certificate signing requests:
-
- \badcode
- openssl req -key client.key -new -out client.req
- \endcode
- \badcode
- openssl req -key server.key -new -out server.req
- \endcode
-
- Let's issue now both certificates from CSRs:
-
- \badcode
- openssl x509 -req -in client.req -out client.pem -CA ca.pem -CAkey ca.key
- \endcode
- \badcode
- openssl x509 -req -in server.req -out server.pem -CA ca.pem -CAkey ca.key
- \endcode
-
- The client certificate subject and the serial number will be displayed for
- selection during authentication. The serial number can be printed with:
-
- \badcode
- openssl x509 -serial -noout -in client.pem
- \endcode
-
- \section1 Implementing the Client
-
- Now we can implement our web browser client.
-
- We start by loading our certificate and its private key and creating \l QSslCertificate
- and \l QSslKey instances.
-
-
- \quotefromfile webenginewidgets/clientcertificate/client.cpp
- \skipto QFile
- \printuntil QSslKey
-
- Now we add the certificate and its private key to \l {QWebEngineClientCertificateStore}.
-
- \printuntil clientCertificateStore
-
- To handle certificates we need to create an instance of \l QWebEnginePage and connect to two
- singals \l QWebEnginePage::certificateError and \l QWebEnginePage::selectClientCertificate.
- The first one is only needed as our self-signed server certificate will trigger a certificate
- error, which has to be accepted to proceed with the authentication. In production
- environments self-signed certificates are not used, therefore in this example we handle
- \l QWebEngineCertificateError just to avoid providing proper certificates.
- Note the private key is a secret and should never be published.
-
- \printuntil acceptCertificate
-
- The handling for \l QWebEnginePage::selectClientCertificate simply displays \l QDialog
- with \l QListWidget showing a list of client certificates to choose from.
- The user selected certificate is then passed to the
- \l QWebEngineClientCertificateSelection::select call.
-
- \printto QWebEngineView
-
- Finally, we create a \l QWebEngineView for our \l QWebEnginePage, load the server
- URL, and show the page.
-
- \printuntil show
-
- \section1 Implementing the Server
-
- For our embedded device we will develop a minimalistic HTTPS server. We can use \l QSslServer
- to handle incoming connections and to provide an \l QSslSocket instance. To do that,
- we create an instance of a \l QSslServer and, similarly to our client setup, we load a server
- certificate and its private key. Next, we create \l QSslCertificate and \l QSslKey objects
- accordingly. Additionally, we need a CA certificate so the server can validate the certificate
- presented by the client. The CA and local certificate are set to \l QSslConfiguration and
- used later by the server.
-
- \quotefromfile webenginewidgets/clientcertificate/server.cpp
- \skipto QSslServer
- \printuntil setSslConfiguration
-
- Next, we set the server to listen for incoming connections on port \c 5555
-
- \printuntil qInfo
-
- We provide a lambda function for the \l QTcpServer::pendingConnectionAvailable signal,
- where we implement handling for incoming connections. This signal is triggered
- after authentication has succeeded and \c socket TLS encryption has started.
-
- \printto readyRead
-
- The \c Request object used above is a simple wrapper around \l QByteArray as we use
- \l QPointer to help with memory management. This object gathers incoming HTTP data.
- It is deleted when the request has completed or a socket has been terminated.
-
- \quotefromfile webenginewidgets/clientcertificate/server.cpp
- \skipto struct
- \printuntil };
-
- The reply for the request depends on the requested URL, and it is sent back through
- the socket in form of a HTML page. For the \c GET root request the administrator sees
- the \c {Access Granted} message and an \c {Exit} HTML button. If the administrator clicks it,
- the client sends another request. This time with the \c{/exit} relative URL,
- which it turn triggers the server termination.
-
- \quotefromfile webenginewidgets/clientcertificate/server.cpp
- \skipto readyRead
- \printuntil });
-
- To run the example, start the \c server and then the \c client. After you select
- the certificate, the \c {Access Granted} page is displayed.
-
- \image granted.png
-*/
diff --git a/examples/webenginewidgets/clientcertificate/resources/ca.pem b/examples/webenginewidgets/clientcertificate/resources/ca.pem
deleted file mode 100644
index cb62ad62c..000000000
--- a/examples/webenginewidgets/clientcertificate/resources/ca.pem
+++ /dev/null
@@ -1,24 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIECzCCAvOgAwIBAgIUdhDW1WgGxF313LYA0JjEQpKbanQwDQYJKoZIhvcNAQEL
-BQAwgZQxCzAJBgNVBAYTAkRFMQ8wDQYDVQQIDAZCZXJsaW4xDzANBgNVBAcMBkJl
-cmxpbjEXMBUGA1UECgwOVGhlIFF0IENvbXBhbnkxFDASBgNVBAsMC1F0V2ViRW5n
-aW5lMRIwEAYDVQQDDAl3d3cucXQuaW8xIDAeBgkqhkiG9w0BCQEWEXF0d2ViZW5n
-aW5lQHF0LmlvMB4XDTIyMTExNjExMDQxNFoXDTMyMTExMzExMDQxNFowgZQxCzAJ
-BgNVBAYTAkRFMQ8wDQYDVQQIDAZCZXJsaW4xDzANBgNVBAcMBkJlcmxpbjEXMBUG
-A1UECgwOVGhlIFF0IENvbXBhbnkxFDASBgNVBAsMC1F0V2ViRW5naW5lMRIwEAYD
-VQQDDAl3d3cucXQuaW8xIDAeBgkqhkiG9w0BCQEWEXF0d2ViZW5naW5lQHF0Lmlv
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxyNLLwAA+FgNQavVJ19n
-gdoy+NKLHQyhzcRFykKSp9aAbpAR6e4ukxwG7mWNBcuR7zv1Zw/JqLFE0gmVztVw
-FeQWdw1cvTN/OlVEuM+0ShTDHHsCqRpx7/XJT6ytMKVU8jdZN4Vl1m7MubWv4aPy
-0WYYd3zIAicciYgy/RHaRhPTKpPzWIPYhmHsM5w2cebL8I0aZXUkC0OeklJArnp9
-007Fr6SXXK0xQ3RO20n7X193gCfd5U70lug0ks/ZZqxtzPHmzIO1WGAOBura50HR
-hxUKAu7qQHzBiW5Qwdn0af4FPLJR/SX8ADKTLCSWlMOo1FLYO5w6D8hB4K6/b9VQ
-RwIDAQABo1MwUTAdBgNVHQ4EFgQUXuTuB85/iBgwJpLdOc+8TB0KESIwHwYDVR0j
-BBgwFoAUXuTuB85/iBgwJpLdOc+8TB0KESIwDwYDVR0TAQH/BAUwAwEB/zANBgkq
-hkiG9w0BAQsFAAOCAQEAvtucUJa0IECltWv8U6R+LQuZ1Q+ubbmstojO/h8tg6Wf
-v6FZ5bH3oboSyGEcytRr6INf4G6znUNAypbodehAEW6/PETdzGM9CJyv2JPJAWzV
-rxb1H5VTyiEs8924QOqcNATD+oe7G0vwnDkvprcqaWBA6yvQkWpCXoqMc+F95KnY
-8VFt2VQw17l4L4nhaX3Us6hJLMiKV+dLeF0pN+pkCPRP9G5WKgW3mT2U6Gig+rLz
-6L7rBbb5KWAttdAbuHCrMa65PgXoVD1P/GteFxUnghDd0PWgUaign8c/DyHGsrbA
-uvJqSym0kmQQXptryRaKFsGcCrizdbE6FfrH2iE7vQ==
------END CERTIFICATE-----
diff --git a/examples/webenginewidgets/clientcertificate/resources/client.key b/examples/webenginewidgets/clientcertificate/resources/client.key
deleted file mode 100644
index 21c8e3183..000000000
--- a/examples/webenginewidgets/clientcertificate/resources/client.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAqnHbq38y1VprEaV2xXzv2nAPyjqCuIfuick8qETkzEsNWPQi
-dsBlLfcyf+15wEMhpRIwILXCrUM7Sb7WCGtg1XC00JZvCh2xPBMSD2fiQyHn4men
-Fwh9vVbTf1v7w21ZT/pXQrwlgLgNWYZHE3JrcEAwlThQRIdQfzSE6/QeHfYZoGB9
-WfvbREsOWiUlZze/yrblS9vnAVhYwVurelc7lXyHA0dHmkcZ0HwMxVJZ/vLuCyIw
-lNGT/ytnA9p1l8uFkAgTcbWZKoyJAsAZG9faZp46hk8+e3KAyKQ78aoUSbjAqnNQ
-tBM3bnHeHanf3ddCxyej+k9PfSIY27a9FZxHpQIDAQABAoIBAFsomA8p8ZsQR9Fh
-SJupDXMrmhZTotRkxxxkR4/LgP8OaO4ZbFFM5xBldFndPc+pV9Y8WwczjxIxsgTo
-Dvrjyx98rwgcXPjxFniFzpP0wJudB7McMs5r2SwpwuYL4SQNWMYgowjrLbehOGqY
-GW16NaIMgq9cNfng0RmnkivMHUtyE5GGdK+C6cyK+fIE+cNtQtHPRKfEnwbE9VHz
-3EY/nCXGZvMFyj5uHaU4EeZFCzo19TUqhh8H7b0EA44pBtb5U/CxsH4xphZ7rpjt
-iVjMfRSMR4qalQNIs6ZEj57We+M/zca/Qq1yhjW+0NYbZifcYo1Oj6e4lC9YlIgn
-kGkcuUECgYEA1j0iVFjgBXS8pJP3jBgmbrbBBTNEUv27yjnJCAQx5TbplJkvBM4/
-qzum1uH2o6uRrFtrYJFiAhDHARtg+70rMeYqZp8WFvzJT5c5s+FOmGQPfFjgrD6e
-wfnCwFzS7nohJ8TM2mPGJ88pBv0eBYW6D0f7fvcJmEk8hnGktdLRCrECgYEAy6tU
-YFZDzGhbgrG2wWzBvAKVngUNhrYZHMiF1WVN8zZdCm7Z8b1S/NMe0rPA5orhAkSX
-8fxlDfKOm+U2fKp43aiN0NDiP0TlGRbypAXe7FSnvDxNHbV+Ie0UbwuiJ4s3vJuc
-6cdzgKqAs5/rjPXPdUpM8C7344HV7azgSzHIYTUCgYAtVmCmcuxtmye0uG+BoTa4
-5UnxvMivu2x7PkFRxfl9JWLHBKfTn4YPyZ7kCIu2VT+NtwcBN6MDBuPmUxHyFDVI
-6Ql+EBqPoM1FX55hd8O3Mi2oxfI94T6dlCpnpP0qZIQRs28apFSx5gArr3Mj/gnC
-5BvP4Z2RMaZyWShfJg8A8QKBgQClZEhswyDjiYtmorJqeMsKxn6BiFDnqFDUUvJ7
-zHx0mR0NL9/Es54Eud059ccccIMwuEs7s17M6MBuUMDik/z647nmbPqNroDs0vnP
-wQS6njRoY/+rtIrtOf1x/9x6iE+G1keigNmHDu7c72z1V1hVQzUfhsS+99yl2dF6
-vr6eUQKBgF/OHW1bE3FruZ+53Arcb94N/IKnpH9VWoB3elIzr0w6pLtL4HHhmQ58
-TayEpq6YguUAjTvCBbaHuYuKPHiXCAy5DhtrXvP4YdMNH9X1nHc7jVEbGltVbnQU
-bG/p5YfZSrDmsjf8w0z7feFOcovC6vF1YCXc8OHK/LQ6JFJ/gtO1
------END RSA PRIVATE KEY-----
diff --git a/examples/webenginewidgets/clientcertificate/resources/client.pem b/examples/webenginewidgets/clientcertificate/resources/client.pem
deleted file mode 100644
index dd1f898f7..000000000
--- a/examples/webenginewidgets/clientcertificate/resources/client.pem
+++ /dev/null
@@ -1,22 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDrzCCApcCFFNQAgGBu5nr81tUMdXXLGkm8Li+MA0GCSqGSIb3DQEBCwUAMIGU
-MQswCQYDVQQGEwJERTEPMA0GA1UECAwGQmVybGluMQ8wDQYDVQQHDAZCZXJsaW4x
-FzAVBgNVBAoMDlRoZSBRdCBDb21wYW55MRQwEgYDVQQLDAtRdFdlYkVuZ2luZTES
-MBAGA1UEAwwJd3d3LnF0LmlvMSAwHgYJKoZIhvcNAQkBFhFxdHdlYmVuZ2luZUBx
-dC5pbzAeFw0yMjExMTYxMjExMDFaFw0zMjExMTMxMjExMDFaMIGSMQswCQYDVQQG
-EwJERTEPMA0GA1UECAwGQmVybGluMQ8wDQYDVQQHDAZCZXJsaW4xFzAVBgNVBAoM
-DlRoZSBRdCBDb21wYW55MRQwEgYDVQQLDAtRdFdlYkVuZ2luZTEVMBMGA1UEAwwM
-Y2xpZW50LnF0LmlvMRswGQYJKoZIhvcNAQkBFgxjbGllbnRAcXQuaW8wggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCqcdurfzLVWmsRpXbFfO/acA/KOoK4
-h+6JyTyoROTMSw1Y9CJ2wGUt9zJ/7XnAQyGlEjAgtcKtQztJvtYIa2DVcLTQlm8K
-HbE8ExIPZ+JDIefiZ6cXCH29VtN/W/vDbVlP+ldCvCWAuA1ZhkcTcmtwQDCVOFBE
-h1B/NITr9B4d9hmgYH1Z+9tESw5aJSVnN7/KtuVL2+cBWFjBW6t6VzuVfIcDR0ea
-RxnQfAzFUln+8u4LIjCU0ZP/K2cD2nWXy4WQCBNxtZkqjIkCwBkb19pmnjqGTz57
-coDIpDvxqhRJuMCqc1C0Ezducd4dqd/d10LHJ6P6T099Ihjbtr0VnEelAgMBAAEw
-DQYJKoZIhvcNAQELBQADggEBALE75ZQxmEXJA16cNAxxmxCKHkaqAE6Ulim1vXNH
-jCFfNCDGYn/R28F3BVtMe+bIMoomaTh3h5eOd/9uc2nm8IiT5FUz9epJWPeRG/cl
-I+hQ3fvaE7oJ3m3EwfGq1mdqUf1zi+DFjtkimNbn9ZRDocZfpO5VN0u23ptEuk0P
-5cH4+Dst0giRMv5W0kXG6QD13H/eVH3jDZCtZa/8T4oxGGskHEa4yDr8s976lVOV
-XLI1r7oN4a/KXKow8WN3oHFeKn4QJx86z1uecuZLtT8xjABKSWpZqgsIlmGTGE1a
-9W06C+uPVamwn5ND3gnf93YQqn6PwrjlHdrQOTG/vngJLPw=
------END CERTIFICATE-----
diff --git a/examples/webenginewidgets/clientcertificate/resources/client.qrc b/examples/webenginewidgets/clientcertificate/resources/client.qrc
deleted file mode 100644
index cc3492e80..000000000
--- a/examples/webenginewidgets/clientcertificate/resources/client.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/resources">
- <file>client.key</file>
- <file>client.pem</file>
- </qresource>
-</RCC>
diff --git a/examples/webenginewidgets/clientcertificate/resources/server.key b/examples/webenginewidgets/clientcertificate/resources/server.key
deleted file mode 100644
index 632cc4d2e..000000000
--- a/examples/webenginewidgets/clientcertificate/resources/server.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEA5gQoJryenjmvzy4RbqHdNXHK8Gk/8Lto1SwT8+Wbh5EyYRTt
-hFdioT1JYcIe3XMwOmx3TjADY1jAXAPfeRcjTkMcnZwF76AXUK2XqBANhaG1wjsi
-b7ISGU/U5/Jarm2iwQJ5zjKsNm8pZYqpmKsYAVFMErtfcpdLdSp6BG54SrbItcXh
-WHfsUs5cuVEi9nCeugLkDzoPLlj/TeouKWOdzhyvLXkPvPmD4/hD0dULTXpCDZhf
-73AuQBWTGsWeUnJQiQhDRwuXWhGRX8qFJQ4rzY8rIbaKhge+BQ6BL+pij2uzHKNQ
-j12ZLFZgLihLDJogGp08y9Ud6Ru/3WGoFkY38wIDAQABAoIBABM/TczQA8XhteB0
-Tmkfik8qknzDkeInDIKqCZFjKTyS3dBZ2/YzCcHMSxOvFr4ZIXQCF4mnYuExUAdj
-G5QaZ43o98AIikae8tSBcitSDI+eFIOIRz1pfTI5B+vQz93AttnHx0GF4/s6GhCx
-JbfsuTmDAAahPz9rgZjwUP2F8PLvaAZqJrXBPY+QLWz0SN2zh6vWAHPbJA0sO/4E
-oWUhRPXJDf33YCFxnwtbUBie5313suAfNspODcyH+AxBH2FFh63pe0ZGOhX7XFMJ
-yxJqujeZrQdfwFZNPXAPVLJGbd7AIOrVE+O8/bYUB/uuj6pPJBqr+Ob/JhY48pRb
-VG2qL4ECgYEA9n3PuL13F9XFcLeergGH7fUcSQeD1T6Z1qaI2Wth0Umfmer/fFZh
-IKSCSwEGMTLsalFdlTj8jsSAasjuSorQTeSgHjzvzik1Ll2P6syputjsD1RX/nkl
-8L50Pwdeey57Y9dgow7Cw/heGYs6dkXLe9H6qM7eoB8Vrk7/TAFuqNECgYEA7uOl
-oKyOxeLn005cenc5enY2IxDhXTaAjTGHE64C0lmicD2OZB7/b+ZIb8M5R7GnCNox
-4TxLSRhZYOMO/QcTrnSND5PXbX/HLd3nyQRIN1XtBbg7pJooxP/MQ/Ne5XTTMjCg
-qPudkOe0ZgUHEcuH8m/YAFY3DDJC50uiXqYtxYMCgYBHfL+ExbZHfGExyp9Duf/x
-PHhCmeJbMzessEnaPLF24FJgcm48YlTzAaMkG5zvIeS9BPIOOCPPSCAyWCn8BnxZ
-SuhBPM0TzpG067+0ijzjiswTuhN3Iy2kv6e5K+rz8MwqbamCQOKtsVehMub2rFFS
-jNiUosKgT8Oa9SBHq9arMQKBgQCE3EVEnFP3iOAILH/QeLiV/GLVk9DTR7mtTUtj
-zZayKLnoFMQ5uOe182x8BCa6UfqlOL0fGKqCZ7Fl6kJuxV3T2+yMKlxZAQTk5JLB
-wMjtRbPCR5mcTUS5c87GR/eSRCwlsNfZw775VXSGfOtWoUzlsACBB3IsLVP6UZ1n
-aKLyQwKBgC61BvKiyGBEYIchqMI4dSF+zCJbSjNUtjwVobcgC6yERZtX2OeLFCoh
-NEf9CcL2Eqb+RzwAD3OV65AiZcrThQNXZ8poBxvwWK8I6E6zB+LX7POAvNu/AV/5
-ANnxwHGGLqi+wTcdMZal2iXkdsrno1Ek/nGMCdA7IVs7l5k7fEpG
------END RSA PRIVATE KEY-----
diff --git a/examples/webenginewidgets/clientcertificate/resources/server.pem b/examples/webenginewidgets/clientcertificate/resources/server.pem
deleted file mode 100644
index 4706fa73e..000000000
--- a/examples/webenginewidgets/clientcertificate/resources/server.pem
+++ /dev/null
@@ -1,22 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDrzCCApcCFFNQAgGBu5nr81tUMdXXLGkm8Li/MA0GCSqGSIb3DQEBCwUAMIGU
-MQswCQYDVQQGEwJERTEPMA0GA1UECAwGQmVybGluMQ8wDQYDVQQHDAZCZXJsaW4x
-FzAVBgNVBAoMDlRoZSBRdCBDb21wYW55MRQwEgYDVQQLDAtRdFdlYkVuZ2luZTES
-MBAGA1UEAwwJd3d3LnF0LmlvMSAwHgYJKoZIhvcNAQkBFhFxdHdlYmVuZ2luZUBx
-dC5pbzAeFw0yMjExMTYxMjExMTRaFw0zMjExMTMxMjExMTRaMIGSMQswCQYDVQQG
-EwJERTEPMA0GA1UECAwGQmVybGluMQ8wDQYDVQQHDAZCZXJsaW4xFzAVBgNVBAoM
-DlRoZSBRdCBDb21wYW55MRQwEgYDVQQLDAtRdFdlYkVuZ2luZTEVMBMGA1UEAwwM
-c2VydmVyLnF0LmlvMRswGQYJKoZIhvcNAQkBFgxzZXJ2ZXJAcXQuaW8wggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDmBCgmvJ6eOa/PLhFuod01ccrwaT/w
-u2jVLBPz5ZuHkTJhFO2EV2KhPUlhwh7dczA6bHdOMANjWMBcA995FyNOQxydnAXv
-oBdQrZeoEA2FobXCOyJvshIZT9Tn8lqubaLBAnnOMqw2bylliqmYqxgBUUwSu19y
-l0t1KnoEbnhKtsi1xeFYd+xSzly5USL2cJ66AuQPOg8uWP9N6i4pY53OHK8teQ+8
-+YPj+EPR1QtNekINmF/vcC5AFZMaxZ5SclCJCENHC5daEZFfyoUlDivNjyshtoqG
-B74FDoEv6mKPa7Mco1CPXZksVmAuKEsMmiAanTzL1R3pG7/dYagWRjfzAgMBAAEw
-DQYJKoZIhvcNAQELBQADggEBAHotgaBbqIlG4EqjzSpX8kQnZnGJUsA51dbY3K5C
-4tNCd+JquQfPmCIKDHkRsmmEU6pcU+LT8m+toJ8Gx0XG4nrdUIDt0Nlf/QrykbPj
-hN8z+aSfP9J5tg4NsT7qMWmqUHOa3BcsgWcC4IwWVkbOMz/XbczEQqdBJMbE0+PC
-32ihTKPZBPC2QlIvXyuwupvQtcXgEjw1r2FQeYcmItk3CKbJPE/Rk4/aXSCo4b0F
-iXPphh8BJPZVvQ2cLpPaGvcse5qjIhF9ODb2HEK3myMwuJVi7teURy8mPlS23Li/
-8gRCNu/stjMlkic7d3dqV0LwaG8+Df1W2wzxsT7IkxN/Z+o=
------END CERTIFICATE-----
diff --git a/examples/webenginewidgets/clientcertificate/resources/server.qrc b/examples/webenginewidgets/clientcertificate/resources/server.qrc
deleted file mode 100644
index 502afa9cc..000000000
--- a/examples/webenginewidgets/clientcertificate/resources/server.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/resources">
- <file>server.key</file>
- <file>server.pem</file>
- <file>ca.pem</file>
- </qresource>
-</RCC>
diff --git a/examples/webenginewidgets/clientcertificate/server.cpp b/examples/webenginewidgets/clientcertificate/server.cpp
deleted file mode 100644
index ee83dab8a..000000000
--- a/examples/webenginewidgets/clientcertificate/server.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qfile.h>
-#include <QtCore/qpointer.h>
-#include <QtCore/qtimer.h>
-#include <QtNetwork/qsslconfiguration.h>
-#include <QtNetwork/qsslkey.h>
-#include <QtNetwork/qsslserver.h>
-
-struct Request : public QObject
-{
- QByteArray m_data;
-};
-
-static const QByteArray http_ok(QByteArrayLiteral(
- "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nConnection: close\r\n\r\n"));
-static const QByteArray html_start(QByteArrayLiteral("<html><style>"
- "div {"
- "height: 400px;"
- "width: 200px;"
- "position: fixed;"
- "top: 50%;"
- "left: 50%;"
- "margin-top: -100px;"
- "margin-left: -200px;"
- "}</style><body><div>"));
-static const QByteArray html_end(QByteArrayLiteral("</div></body></html>"));
-
-int main(int argc, char *argv[])
-{
- QCoreApplication::setOrganizationName("QtExamples");
- QCoreApplication app(argc, argv);
-
- QSslServer server;
- QSslConfiguration configuration(QSslConfiguration::defaultConfiguration());
- configuration.setPeerVerifyMode(QSslSocket::VerifyPeer);
-
- QFile keyFile(":/resources/server.key");
- keyFile.open(QIODevice::ReadOnly);
-
- QSslKey key(keyFile.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey);
- configuration.setPrivateKey(key);
-
- QList<QSslCertificate> localCerts = QSslCertificate::fromPath(":/resources/server.pem");
- configuration.setLocalCertificateChain(localCerts);
-
- QList<QSslCertificate> caCerts = QSslCertificate::fromPath(":resources/ca.pem");
- configuration.addCaCertificates(caCerts);
-
- server.setSslConfiguration(configuration);
-
- if (!server.listen(QHostAddress::LocalHost, 5555))
- qFatal("Could not start server on localhost:5555");
- else
- qInfo("Server started on localhost:5555");
-
- QObject::connect(&server, &QTcpServer::pendingConnectionAvailable, [&server]() {
- QTcpSocket *socket = server.nextPendingConnection();
- Q_ASSERT(socket);
-
- QPointer<Request> request(new Request);
-
- QObject::connect(socket, &QAbstractSocket::disconnected, socket,
- [socket, request]() mutable {
- delete request;
- socket->deleteLater();
- });
-
- QObject::connect(socket, &QTcpSocket::readyRead, socket, [socket, request]() mutable {
- request->m_data.append(socket->readAll());
-
- if (!request->m_data.endsWith("\r\n\r\n"))
- return;
-
- socket->write(http_ok);
- socket->write(html_start);
-
- if (request->m_data.startsWith("GET / ")) {
- socket->write("<p>ACCESS GRANTED !</p>");
- socket->write("<p>You reached the place, where no one has gone before.</p>");
- socket->write("<button onclick=\"window.location.href='/exit'\">Exit</button>");
- } else if (request->m_data.startsWith("GET /exit ")) {
- socket->write("<p>BYE !</p>");
- socket->write("<p>Have good day ...</p>");
- QTimer::singleShot(0, &QCoreApplication::quit);
- } else {
- socket->write("<p>There is nothing to see here.</p>");
- }
-
- socket->write(html_end);
- delete request;
- socket->disconnectFromHost();
- });
- });
-
- return app.exec();
-}
diff --git a/examples/webenginewidgets/clientcertificate/server.pro b/examples/webenginewidgets/clientcertificate/server.pro
deleted file mode 100644
index b8fda1717..000000000
--- a/examples/webenginewidgets/clientcertificate/server.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-
-QT += core network
-CONFIG += console
-
-SOURCES += server.cpp
-
-RESOURCES += resources/server.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/clientcertificate/server
-INSTALLS += target
diff --git a/examples/webenginewidgets/simplebrowser/browser.cpp b/examples/webenginewidgets/simplebrowser/browser.cpp
index 83e273d07..f1ed68739 100644
--- a/examples/webenginewidgets/simplebrowser/browser.cpp
+++ b/examples/webenginewidgets/simplebrowser/browser.cpp
@@ -6,8 +6,6 @@
#include <QWebEngineSettings>
-using namespace Qt::StringLiterals;
-
Browser::Browser()
{
// Quit application if the download manager window is the only remaining window
@@ -21,8 +19,8 @@ Browser::Browser()
BrowserWindow *Browser::createHiddenWindow(bool offTheRecord)
{
if (!offTheRecord && !m_profile) {
- const QString name = u"simplebrowser."_s + QLatin1StringView(qWebEngineChromiumVersion());
- m_profile.reset(new QWebEngineProfile(name));
+ m_profile.reset(new QWebEngineProfile(
+ QString::fromLatin1("simplebrowser.%1").arg(qWebEngineChromiumVersion())));
m_profile->settings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);
m_profile->settings()->setAttribute(QWebEngineSettings::DnsPrefetchEnabled, true);
m_profile->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true);
diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.cpp b/examples/webenginewidgets/simplebrowser/browserwindow.cpp
index 7f30d2e92..d5b097b22 100644
--- a/examples/webenginewidgets/simplebrowser/browserwindow.cpp
+++ b/examples/webenginewidgets/simplebrowser/browserwindow.cpp
@@ -21,8 +21,6 @@
#include <QWebEngineFindTextResult>
#include <QWebEngineProfile>
-using namespace Qt::StringLiterals;
-
BrowserWindow::BrowserWindow(Browser *browser, QWebEngineProfile *profile, bool forDevTools)
: m_browser(browser)
, m_profile(profile)
@@ -52,7 +50,8 @@ BrowserWindow::BrowserWindow(Browser *browser, QWebEngineProfile *profile, bool
m_progressBar->setMaximumHeight(1);
m_progressBar->setTextVisible(false);
- m_progressBar->setStyleSheet(u"QProgressBar {border: 0px} QProgressBar::chunk {background-color: #da4453}"_s);
+ m_progressBar->setStyleSheet(QStringLiteral(
+ "QProgressBar {border: 0px} QProgressBar::chunk {background-color: #da4453}"));
layout->addWidget(m_progressBar);
}
@@ -320,7 +319,7 @@ QToolBar *BrowserWindow::createToolBar()
backShortcuts.append(QKeySequence(Qt::Key_Back));
m_historyBackAction->setShortcuts(backShortcuts);
m_historyBackAction->setIconVisibleInMenu(false);
- m_historyBackAction->setIcon(QIcon(u":go-previous.png"_s));
+ m_historyBackAction->setIcon(QIcon(QStringLiteral(":go-previous.png")));
m_historyBackAction->setToolTip(tr("Go back in history"));
connect(m_historyBackAction, &QAction::triggered, [this]() {
m_tabWidget->triggerWebPageAction(QWebEnginePage::Back);
@@ -332,7 +331,7 @@ QToolBar *BrowserWindow::createToolBar()
fwdShortcuts.append(QKeySequence(Qt::Key_Forward));
m_historyForwardAction->setShortcuts(fwdShortcuts);
m_historyForwardAction->setIconVisibleInMenu(false);
- m_historyForwardAction->setIcon(QIcon(u":go-next.png"_s));
+ m_historyForwardAction->setIcon(QIcon(QStringLiteral(":go-next.png")));
m_historyForwardAction->setToolTip(tr("Go forward in history"));
connect(m_historyForwardAction, &QAction::triggered, [this]() {
m_tabWidget->triggerWebPageAction(QWebEnginePage::Forward);
@@ -352,7 +351,7 @@ QToolBar *BrowserWindow::createToolBar()
navigationBar->addWidget(m_urlLineEdit);
auto downloadsAction = new QAction(this);
- downloadsAction->setIcon(QIcon(u":go-bottom.png"_s));
+ downloadsAction->setIcon(QIcon(QStringLiteral(":go-bottom.png")));
downloadsAction->setToolTip(tr("Show downloads"));
navigationBar->addAction(downloadsAction);
connect(downloadsAction, &QAction::triggered,
@@ -456,8 +455,8 @@ WebView *BrowserWindow::currentTab() const
void BrowserWindow::handleWebViewLoadProgress(int progress)
{
- static QIcon stopIcon(u":process-stop.png"_s);
- static QIcon reloadIcon(u":view-refresh.png"_s);
+ static QIcon stopIcon(QStringLiteral(":process-stop.png"));
+ static QIcon reloadIcon(QStringLiteral(":view-refresh.png"));
if (0 < progress && progress < 100) {
m_stopReloadAction->setData(QWebEnginePage::Stop);
diff --git a/examples/webenginewidgets/simplebrowser/downloadwidget.cpp b/examples/webenginewidgets/simplebrowser/downloadwidget.cpp
index 83784b628..f8b96c6e6 100644
--- a/examples/webenginewidgets/simplebrowser/downloadwidget.cpp
+++ b/examples/webenginewidgets/simplebrowser/downloadwidget.cpp
@@ -7,8 +7,6 @@
#include <QUrl>
#include <QWebEngineDownloadRequest>
-using namespace Qt::StringLiterals;
-
DownloadWidget::DownloadWidget(QWebEngineDownloadRequest *download, QWidget *parent)
: QFrame(parent)
, m_download(download)
@@ -98,11 +96,11 @@ void DownloadWidget::updateWidget()
}
if (state == QWebEngineDownloadRequest::DownloadInProgress) {
- static QIcon cancelIcon(u":process-stop.png"_s);
+ static QIcon cancelIcon(QStringLiteral(":process-stop.png"));
m_cancelButton->setIcon(cancelIcon);
m_cancelButton->setToolTip(tr("Stop downloading"));
} else {
- static QIcon removeIcon(u":edit-clear.png"_s);
+ static QIcon removeIcon(QStringLiteral(":edit-clear.png"));
m_cancelButton->setIcon(removeIcon);
m_cancelButton->setToolTip(tr("Remove from list"));
}
diff --git a/examples/webenginewidgets/simplebrowser/main.cpp b/examples/webenginewidgets/simplebrowser/main.cpp
index d5d9e78ab..b945ef27e 100644
--- a/examples/webenginewidgets/simplebrowser/main.cpp
+++ b/examples/webenginewidgets/simplebrowser/main.cpp
@@ -9,16 +9,14 @@
#include <QWebEngineProfile>
#include <QWebEngineSettings>
-using namespace Qt::StringLiterals;
-
QUrl commandLineUrlArgument()
{
const QStringList args = QCoreApplication::arguments();
for (const QString &arg : args.mid(1)) {
- if (!arg.startsWith(u'-'))
+ if (!arg.startsWith(QLatin1Char('-')))
return QUrl::fromUserInput(arg);
}
- return QUrl(u"https://www.qt.io"_s);
+ return QUrl(QStringLiteral("https://www.qt.io"));
}
int main(int argc, char **argv)
@@ -26,8 +24,8 @@ int main(int argc, char **argv)
QCoreApplication::setOrganizationName("QtExamples");
QApplication app(argc, argv);
- app.setWindowIcon(QIcon(u":AppLogoColor.png"_s));
- QLoggingCategory::setFilterRules(u"qt.webenginecontext.debug=true"_s);
+ app.setWindowIcon(QIcon(QStringLiteral(":AppLogoColor.png")));
+ QLoggingCategory::setFilterRules(QStringLiteral("qt.webenginecontext.debug=true"));
QWebEngineProfile::defaultProfile()->settings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);
QWebEngineProfile::defaultProfile()->settings()->setAttribute(QWebEngineSettings::DnsPrefetchEnabled, true);
diff --git a/examples/webenginewidgets/simplebrowser/tabwidget.cpp b/examples/webenginewidgets/simplebrowser/tabwidget.cpp
index f9037a8e1..e4e204ce9 100644
--- a/examples/webenginewidgets/simplebrowser/tabwidget.cpp
+++ b/examples/webenginewidgets/simplebrowser/tabwidget.cpp
@@ -9,8 +9,6 @@
#include <QTabBar>
#include <QWebEngineProfile>
-using namespace Qt::StringLiterals;
-
TabWidget::TabWidget(QWebEngineProfile *profile, QWidget *parent)
: QTabWidget(parent)
, m_profile(profile)
@@ -34,10 +32,10 @@ TabWidget::TabWidget(QWebEngineProfile *profile, QWidget *parent)
if (profile->isOffTheRecord()) {
QLabel *icon = new QLabel(this);
- QPixmap pixmap(u":ninja.png"_s);
+ QPixmap pixmap(QStringLiteral(":ninja.png"));
icon->setPixmap(pixmap.scaledToHeight(tabBar->height()));
- setStyleSheet(u"QTabWidget::tab-bar { left: %1px; }"_s.
- arg(icon->pixmap().width()));
+ setStyleSheet(
+ QStringLiteral("QTabWidget::tab-bar { left: %1px; }").arg(icon->pixmap().width()));
}
}
diff --git a/examples/webenginewidgets/simplebrowser/webview.cpp b/examples/webenginewidgets/simplebrowser/webview.cpp
index e024f9126..e41d4334e 100644
--- a/examples/webenginewidgets/simplebrowser/webview.cpp
+++ b/examples/webenginewidgets/simplebrowser/webview.cpp
@@ -17,8 +17,6 @@
#include <QTimer>
#include <QStyle>
-using namespace Qt::StringLiterals;
-
WebView::WebView(QWidget *parent)
: QWebEngineView(parent)
{
@@ -148,15 +146,16 @@ QIcon WebView::favIcon() const
return favIcon;
if (m_loadProgress < 0) {
- static QIcon errorIcon(u":dialog-error.png"_s);
+ static QIcon errorIcon(QStringLiteral(":dialog-error.png"));
return errorIcon;
}
+
if (m_loadProgress < 100) {
- static QIcon loadingIcon(u":view-refresh.png"_s);
+ static QIcon loadingIcon(QStringLiteral(":view-refresh.png"));
return loadingIcon;
}
- static QIcon defaultIcon(u":text-html.png"_s);
+ static QIcon defaultIcon(":text-html.png");
return defaultIcon;
}
diff --git a/examples/webenginewidgets/webenginewidgets.pro b/examples/webenginewidgets/webenginewidgets.pro
index 2a24686cf..0d65d6b95 100644
--- a/examples/webenginewidgets/webenginewidgets.pro
+++ b/examples/webenginewidgets/webenginewidgets.pro
@@ -22,5 +22,3 @@ qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross
} else {
message("Spellchecker example will not be built because it depends on usage of Hunspell dictionaries.")
}
-
-qtConfig(ssl): SUBDIRS += clientcertificate
diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
index a2e00cfa1..5a1de8f38 100644
--- a/src/core/browser_accessibility_qt.cpp
+++ b/src/core/browser_accessibility_qt.cpp
@@ -234,11 +234,7 @@ void *BrowserAccessibilityInterface::interface_cast(QAccessible::InterfaceType t
}
case QAccessible::TableCellInterface: {
QAccessible::Role r = role();
- if (r == QAccessible::Cell) {
- Q_ASSERT(findTable());
- return static_cast<QAccessibleTableCellInterface *>(this);
- }
- if (r == QAccessible::ListItem || r == QAccessible::TreeItem) {
+ if (r == QAccessible::Cell || r == QAccessible::ListItem || r == QAccessible::TreeItem) {
if (findTable())
return static_cast<QAccessibleTableCellInterface *>(this);
}
diff --git a/src/core/compositor/native_skia_output_device_mac.mm b/src/core/compositor/native_skia_output_device_mac.mm
index 51b11b13f..0200a4a46 100644
--- a/src/core/compositor/native_skia_output_device_mac.mm
+++ b/src/core/compositor/native_skia_output_device_mac.mm
@@ -4,7 +4,7 @@
#import <IOSurface/IOSurface.h>
#import <Metal/Metal.h>
-#include <QtCore/qtconfigmacros.h>
+#include <QtWebEngineCore/qtwebenginecoreglobal.h>
QT_BEGIN_NAMESPACE
class QSGTexture;
diff --git a/src/core/doc/about_credits_entry.tmpl b/src/core/doc/about_credits_entry.tmpl
index aa94f2945..2bb9cff4e 100644
--- a/src/core/doc/about_credits_entry.tmpl
+++ b/src/core/doc/about_credits_entry.tmpl
@@ -1,6 +1,5 @@
/*!
-\page qtwebengine-3rdparty-{{name-sanitized}}.html
-\attribution
+\page qtwebengine-3rdparty-{{name-sanitized}}.html attribution
\ingroup qtwebengine-licensing
\brief {{license-type}}
\title {{name}}
diff --git a/src/core/doc/src/qtwebengine-deploying.qdoc b/src/core/doc/src/qtwebengine-deploying.qdoc
index 625570fee..502bffe9d 100644
--- a/src/core/doc/src/qtwebengine-deploying.qdoc
+++ b/src/core/doc/src/qtwebengine-deploying.qdoc
@@ -141,6 +141,10 @@
\section2 \macos Specific Deployment Steps
+ To deploy a \QWE application on \maocs, you will need to ensure that the \QWE process is signed
+ with an entitlements file that at least contains the entitlements listed in
+ QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/Resources/QtWebEngineProcess.entitlements.
+
To deploy a \QWE application that accesses the microphone or camera
on \macos, you will need to provide texts for the messages that will be shown to the user to
explain why the application asks for permission to access to the camera or microphone.
diff --git a/src/core/doc/src/qwebengine-licensing.qdoc b/src/core/doc/src/qwebengine-licensing.qdoc
index 796a9664d..ed1c5f376 100644
--- a/src/core/doc/src/qwebengine-licensing.qdoc
+++ b/src/core/doc/src/qwebengine-licensing.qdoc
@@ -22,8 +22,7 @@ Third party licenses included in the sources are:
*/
/*!
-\page qtwebengine-3rdparty-chromium-global.html
-\attribution
+\page qtwebengine-3rdparty-chromium-global.html attribution
\ingroup qtwebengine-licensing
\title Chromium License
\brief BSD
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 70b1a77b0..52be749c2 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -178,31 +178,6 @@ bool usingSoftwareDynamicGL()
#endif
}
-#if defined(Q_OS_WIN)
-static QString getAdapterLuid() {
- static const bool preferSoftwareDevice = qEnvironmentVariableIntValue("QSG_RHI_PREFER_SOFTWARE_RENDERER");
- QRhiD3D11InitParams rhiParams;
- QRhi::Flags flags;
- if (preferSoftwareDevice) {
- flags |= QRhi::PreferSoftwareRenderer;
- }
- QScopedPointer<QRhi> rhi(QRhi::create(QRhi::D3D11,&rhiParams,flags,nullptr));
- // mimic what QSGRhiSupport and QBackingStoreRhi does
- if (!rhi && !preferSoftwareDevice) {
- flags |= QRhi::PreferSoftwareRenderer;
- rhi.reset(QRhi::create(QRhi::D3D11, &rhiParams, flags));
- }
- if (rhi) {
- const QRhiD3D11NativeHandles *handles =
- static_cast<const QRhiD3D11NativeHandles *>(rhi->nativeHandles());
- Q_ASSERT(handles);
- return QString("%1,%2").arg(handles->adapterLuidHigh).arg(handles->adapterLuidLow);
- } else {
- return QString();
- }
-}
-#endif
-
static bool openGLPlatformSupport()
{
return QGuiApplicationPrivate::platformIntegration()->hasCapability(
@@ -278,6 +253,31 @@ static const char *getGLType(bool /*enableGLSoftwareRendering*/, bool disableGpu
}
#endif // QT_CONFIG(opengl)
+#if defined(Q_OS_WIN)
+static QString getAdapterLuid() {
+ static const bool preferSoftwareDevice = qEnvironmentVariableIntValue("QSG_RHI_PREFER_SOFTWARE_RENDERER");
+ QRhiD3D11InitParams rhiParams;
+ QRhi::Flags flags;
+ if (preferSoftwareDevice) {
+ flags |= QRhi::PreferSoftwareRenderer;
+ }
+ QScopedPointer<QRhi> rhi(QRhi::create(QRhi::D3D11,&rhiParams,flags,nullptr));
+ // mimic what QSGRhiSupport and QBackingStoreRhi does
+ if (!rhi && !preferSoftwareDevice) {
+ flags |= QRhi::PreferSoftwareRenderer;
+ rhi.reset(QRhi::create(QRhi::D3D11, &rhiParams, flags));
+ }
+ if (rhi) {
+ const QRhiD3D11NativeHandles *handles =
+ static_cast<const QRhiD3D11NativeHandles *>(rhi->nativeHandles());
+ Q_ASSERT(handles);
+ return QString("%1,%2").arg(handles->adapterLuidHigh).arg(handles->adapterLuidLow);
+ } else {
+ return QString();
+ }
+}
+#endif
+
#if QT_CONFIG(webengine_pepper_plugins)
void dummyGetPluginCallback(const std::vector<content::WebPluginInfo>&)
{
diff --git a/src/host/CMakeLists.txt b/src/host/CMakeLists.txt
index 6d327a330..d579a61b8 100644
--- a/src/host/CMakeLists.txt
+++ b/src/host/CMakeLists.txt
@@ -19,7 +19,7 @@ project(QtWebEngineConfigure
VERSION "${QT_REPO_MODULE_VERSION}"
LANGUAGES CXX C)
-find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
+find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS BuildInternals Core)
if(COMMAND qt_internal_project_setup)
qt_internal_project_setup()
diff --git a/src/pdf/CMakeLists.txt b/src/pdf/CMakeLists.txt
index e79bbd85e..a752a7c07 100644
--- a/src/pdf/CMakeLists.txt
+++ b/src/pdf/CMakeLists.txt
@@ -189,7 +189,7 @@ foreach(arch ${archs})
CONDITION QT_FEATURE_pdf_xfa_tiff
)
extend_gn_list(gnArgArg
- ARGS pdfium_use_system_zlib
+ ARGS pdfium_use_system_zlib use_system_zlib
CONDITION QT_FEATURE_webengine_system_zlib
)
extend_gn_list(gnArgArg
diff --git a/src/pdf/doc/about_credits_entry.tmpl b/src/pdf/doc/about_credits_entry.tmpl
index 294198709..c6dc90242 100644
--- a/src/pdf/doc/about_credits_entry.tmpl
+++ b/src/pdf/doc/about_credits_entry.tmpl
@@ -1,6 +1,5 @@
/*!
-\page qtpdf-3rdparty-{{name-sanitized}}.html
-\attribution
+\page qtpdf-3rdparty-{{name-sanitized}}.html attribution
\ingroup qtpdf-licensing
\brief {{license-type}}
\title {{name}}
diff --git a/src/pdf/doc/images/multipageviewer.png b/src/pdf/doc/images/multipageviewer.png
index 2f0bb62a2..f6ebd2d83 100644
--- a/src/pdf/doc/images/multipageviewer.png
+++ b/src/pdf/doc/images/multipageviewer.png
Binary files differ
diff --git a/src/pdf/qpdfbookmarkmodel.cpp b/src/pdf/qpdfbookmarkmodel.cpp
index 78d89cc9b..93dbf5d1f 100644
--- a/src/pdf/qpdfbookmarkmodel.cpp
+++ b/src/pdf/qpdfbookmarkmodel.cpp
@@ -260,6 +260,10 @@ QPdfDocument* QPdfBookmarkModel::document() const
return d->m_document;
}
+/*!
+ \property QPdfBookmarkModel::document
+ \brief the PDF document in which bookmarks are to be found.
+*/
void QPdfBookmarkModel::setDocument(QPdfDocument *document)
{
if (d->m_document == document)
diff --git a/src/webenginewidgets/api/qwebengineview.h b/src/webenginewidgets/api/qwebengineview.h
index d594c8254..dc1393885 100644
--- a/src/webenginewidgets/api/qwebengineview.h
+++ b/src/webenginewidgets/api/qwebengineview.h
@@ -6,6 +6,7 @@
#include <QtGui/QPageLayout>
#include <QtGui/qpageranges.h>
+#include <QtWidgets/qmenu.h>
#include <QtWidgets/qwidget.h>
#include <QtWebEngineWidgets/qtwebenginewidgetsglobal.h>
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9e02c40ca..a8f031a5d 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,3 +1 @@
-if(Qt6Core_VERSION VERSION_GREATER_EQUAL "6.5")
- qt_build_tests()
-endif()
+qt_build_tests()
diff --git a/tests/auto/core/CMakeLists.txt b/tests/auto/core/CMakeLists.txt
index 5615d6b2d..4e8d5f128 100644
--- a/tests/auto/core/CMakeLists.txt
+++ b/tests/auto/core/CMakeLists.txt
@@ -7,7 +7,7 @@ add_subdirectory(qwebengineurlrequestinterceptor)
add_subdirectory(origins)
add_subdirectory(devtools)
-if(QT_FEATURE_ssl)
+if(QT_FEATURE_ssl AND QT_VERSION VERSION_GREATER_EQUAL "6.4")
add_subdirectory(qwebengineclientcertificatestore)
add_subdirectory(certificateerror)
endif()
diff --git a/tests/auto/core/certificateerror/tst_certificateerror.cpp b/tests/auto/core/certificateerror/tst_certificateerror.cpp
index 67e2d8ae4..fd22f5d63 100644
--- a/tests/auto/core/certificateerror/tst_certificateerror.cpp
+++ b/tests/auto/core/certificateerror/tst_certificateerror.cpp
@@ -105,7 +105,6 @@ void tst_CertificateError::handleError()
QTRY_COMPARE_WITH_TIMEOUT(page.loadSpy.size(), 1, 30000);
QCOMPARE(page.loadSpy.takeFirst().value(0).toBool(), acceptCertificate);
QCOMPARE(toPlainTextSync(&page), expectedContent);
- QVERIFY(server.stop());
}
void tst_CertificateError::fatalError()
diff --git a/tests/auto/httpserver/httpserver.cpp b/tests/auto/httpserver/httpserver.cpp
index e08af77e7..c65d68ce7 100644
--- a/tests/auto/httpserver/httpserver.cpp
+++ b/tests/auto/httpserver/httpserver.cpp
@@ -24,8 +24,7 @@ HttpServer::HttpServer(QTcpServer *tcpServer, const QString &protocol,
{
m_url.setHost(hostAddress.toString());
m_url.setScheme(protocol);
- connect(tcpServer, &QTcpServer::pendingConnectionAvailable, this,
- &HttpServer::handleNewConnection);
+ connect(tcpServer, &QTcpServer::newConnection, this, &HttpServer::handleNewConnection);
}
HttpServer::~HttpServer()
diff --git a/tests/auto/httpserver/httpsserver.h b/tests/auto/httpserver/httpsserver.h
index 10deeb322..d064c1416 100644
--- a/tests/auto/httpserver/httpsserver.h
+++ b/tests/auto/httpserver/httpsserver.h
@@ -7,56 +7,51 @@
#include "httpserver.h"
#include <QDebug>
-#include <QtCore/qfile.h>
-#include <QtNetwork/qsslkey.h>
-#include <QtNetwork/qsslsocket.h>
-#include <QtNetwork/qsslconfiguration.h>
-#include <QtNetwork/qsslserver.h>
+#include <QFile>
+#include <QSslKey>
+#include <QSslSocket>
+#include <QSslConfiguration>
+#include <QTcpServer>
-static QSslServer *createServer(const QString &certificateFileName, const QString &keyFileName,
- const QString &ca)
+struct SslTcpServer : QTcpServer
{
- QSslConfiguration configuration(QSslConfiguration::defaultConfiguration());
+ SslTcpServer(const QString &certPath, const QString &keyPath) {
+ sslconf.setLocalCertificateChain(QSslCertificate::fromPath(certPath));
+ sslconf.setPrivateKey(readKey(keyPath));
+ }
+
+ void incomingConnection(qintptr d) override {
+ auto socket = new QSslSocket(this);
+ socket->setSslConfiguration(sslconf);
- QFile keyFile(keyFileName);
- if (keyFile.open(QIODevice::ReadOnly)) {
- QSslKey key(keyFile.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey);
- if (!key.isNull()) {
- configuration.setPrivateKey(key);
- } else {
- qCritical() << "Could not parse key: " << keyFileName;
+ if (!socket->setSocketDescriptor(d)) {
+ qWarning() << "Failed to setup ssl socket!";
+ delete socket;
+ return;
}
- } else {
- qCritical() << "Could not find key: " << keyFileName;
- }
- QList<QSslCertificate> localCerts = QSslCertificate::fromPath(certificateFileName);
- if (!localCerts.isEmpty()) {
- configuration.setLocalCertificateChain(localCerts);
- } else {
- qCritical() << "Could not find certificate: " << certificateFileName;
+ connect(socket, QOverload<QSslSocket::SocketError>::of(&QSslSocket::errorOccurred),
+ [] (QSslSocket::SocketError e) { qWarning() << "! Socket Error:" << e; });
+ connect(socket, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors),
+ [] (const QList<QSslError> &le) { qWarning() << "! SSL Errors:\n" << le; });
+
+ addPendingConnection(socket);
+ socket->startServerEncryption();
}
- if (!ca.isEmpty()) {
- QList<QSslCertificate> caCerts = QSslCertificate::fromPath(ca);
- if (!caCerts.isEmpty()) {
- configuration.addCaCertificates(caCerts);
- configuration.setPeerVerifyMode(QSslSocket::VerifyPeer);
- } else {
- qCritical() << "Could not find certificate: " << certificateFileName;
- }
+ QSslKey readKey(const QString &path) const {
+ QFile file(path);
+ file.open(QIODevice::ReadOnly);
+ return QSslKey(file.readAll(), QSsl::Rsa, QSsl::Pem);
}
- QSslServer *server = new QSslServer();
- server->setSslConfiguration(configuration);
- return server;
-}
+ QSslConfiguration sslconf;
+};
struct HttpsServer : HttpServer
{
- HttpsServer(const QString &certPath, const QString &keyPath, const QString &ca,
- QObject *parent = nullptr)
- : HttpServer(createServer(certPath, keyPath, ca), "https", QHostAddress::LocalHost, 0,
+ HttpsServer(const QString &certPath, const QString &keyPath, QObject *parent = nullptr)
+ : HttpServer(new SslTcpServer(certPath, keyPath), "https", QHostAddress::LocalHost, 0,
parent)
{
}
diff --git a/tests/auto/quick/qmltests/tst_qmltests.cpp b/tests/auto/quick/qmltests/tst_qmltests.cpp
index 9e928157e..d27ef269d 100644
--- a/tests/auto/quick/qmltests/tst_qmltests.cpp
+++ b/tests/auto/quick/qmltests/tst_qmltests.cpp
@@ -263,7 +263,7 @@ int main(int argc, char **argv)
#if QT_CONFIG(ssl)
qmlRegisterSingletonType<HttpsServer>(
"Test.Shared", 1, 0, "HttpsServer", [&](QQmlEngine *, QJSEngine *) {
- return new HttpsServer(":/resources/server.pem", ":/resources/server.key", "");
+ return new HttpsServer(":/resources/server.pem", ":/resources/server.key");
});
#endif
Setup setup;
diff --git a/tests/auto/widgets/accessibility/tst_accessibility.cpp b/tests/auto/widgets/accessibility/tst_accessibility.cpp
index 68566c082..f2cd4d05d 100644
--- a/tests/auto/widgets/accessibility/tst_accessibility.cpp
+++ b/tests/auto/widgets/accessibility/tst_accessibility.cpp
@@ -50,6 +50,7 @@ private Q_SLOTS:
void roles();
void objectName();
void crossTreeParent();
+ void tableCellInterface();
};
// This will be called before the first test function is executed.
@@ -605,6 +606,58 @@ void tst_Accessibility::crossTreeParent()
QCOMPARE(p->object()->objectName(), QStringLiteral("my_id"));
}
+void tst_Accessibility::tableCellInterface()
+{
+ QWebEngineView webView;
+ webView.resize(400, 400);
+ webView.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&webView));
+
+ QSignalSpy spyFinished(&webView, &QWebEngineView::loadFinished);
+ webView.setHtml(QLatin1String(
+ "<html><body>"
+ " <ul>"
+ " <li><a href='#link1' id='link1'>Link in ListItem</a></li>"
+ " </ul>"
+ ""
+ " <div role='rowgroup'>"
+ " <div role='row'>"
+ " <span role='cell'><a href='#link2' id='link2'>Link in Cell</a></span>"
+ " </div>"
+ " </div>"
+ "</body></html>"));
+ QTRY_COMPARE(spyFinished.size(), 1);
+
+ QAccessibleInterface *view = QAccessible::queryAccessibleInterface(&webView);
+ QAccessibleInterface *document = view->child(0);
+ QTRY_COMPARE(document->childCount(), 2);
+
+ // ListItem without Table parent.
+ {
+ QAccessibleInterface *list = document->child(0);
+ QAccessibleInterface *listItem = list->child(0);
+ QVERIFY(!listItem->tableCellInterface());
+
+ // Should not crash.
+ QPoint linkCenter = elementCenter(webView.page(), QLatin1String("link1"));
+ QTest::mouseClick(webView.focusProxy(), Qt::LeftButton, {}, linkCenter);
+ QTRY_COMPARE(webView.url().fragment(), QLatin1String("link1"));
+ }
+
+ // Cell without Table parent.
+ {
+ QAccessibleInterface *rowgroup = document->child(1);
+ QAccessibleInterface *row = rowgroup->child(0);
+ QAccessibleInterface *cell = row->child(0);
+ QVERIFY(!cell->tableCellInterface());
+
+ // Should not crash.
+ QPoint linkCenter = elementCenter(webView.page(), QLatin1String("link2"));
+ QTest::mouseClick(webView.focusProxy(), Qt::LeftButton, {}, linkCenter);
+ QTRY_COMPARE(webView.url().fragment(), QLatin1String("link2"));
+ }
+}
+
static QByteArrayList params = QByteArrayList()
<< "--force-renderer-accessibility"
<< "--enable-features=AccessibilityExposeARIAAnnotations";
diff --git a/tests/manual/quick/touchbrowser/touchmockingapplication.cpp b/tests/manual/quick/touchbrowser/touchmockingapplication.cpp
index 4fad86d33..2a17757dc 100644
--- a/tests/manual/quick/touchbrowser/touchmockingapplication.cpp
+++ b/tests/manual/quick/touchbrowser/touchmockingapplication.cpp
@@ -66,10 +66,10 @@ bool TouchMockingApplication::notify(QObject* target, QEvent* event)
if (event->type() == QEvent::KeyRelease && static_cast<QKeyEvent*>(event)->key() == Qt::Key_Control) {
foreach (int id, m_heldTouchPoints)
if (m_touchPoints.contains(id) && !QGuiApplication::mouseButtons().testFlag(Qt::MouseButton(id))) {
- QMutableEventPoint::setState(m_touchPoints[id], QEventPoint::Released);
+ QMutableEventPoint::from(m_touchPoints[id]).setState(QEventPoint::Released);
m_heldTouchPoints.remove(id);
} else
- QMutableEventPoint::setState(m_touchPoints[id], QEventPoint::Stationary);
+ QMutableEventPoint::from(m_touchPoints[id]).setState(QEventPoint::Stationary);
sendTouchEvent(window, m_heldTouchPoints.isEmpty() ? QEvent::TouchEnd : QEvent::TouchUpdate, static_cast<QKeyEvent*>(event)->timestamp());
}
@@ -78,18 +78,18 @@ bool TouchMockingApplication::notify(QObject* target, QEvent* event)
const QMouseEvent* const mouseEvent = static_cast<QMouseEvent*>(event);
QEventPoint touchPoint;
- QMutableEventPoint::setPressure(touchPoint, 1);
+ QMutableEventPoint::from(touchPoint).setPressure(1);
QEvent::Type touchType = QEvent::None;
switch (mouseEvent->type()) {
case QEvent::MouseButtonPress:
- QMutableEventPoint::setId(touchPoint, mouseEvent->button());
+ QMutableEventPoint::from(touchPoint).setId(mouseEvent->button());
if (m_touchPoints.contains(touchPoint.id())) {
- QMutableEventPoint::setState(touchPoint, QEventPoint::Updated);
+ QMutableEventPoint::from(touchPoint).setState(QEventPoint::Updated);
touchType = QEvent::TouchUpdate;
} else {
- QMutableEventPoint::setState(touchPoint, QEventPoint::Pressed);
+ QMutableEventPoint::from(touchPoint).setState(QEventPoint::Pressed);
// Check if more buttons are held down than just the event triggering one.
if (mouseEvent->buttons() > mouseEvent->button())
touchType = QEvent::TouchUpdate;
@@ -107,8 +107,8 @@ bool TouchMockingApplication::notify(QObject* target, QEvent* event)
return true;
}
touchType = QEvent::TouchUpdate;
- QMutableEventPoint::setId(touchPoint, mouseEvent->buttons());
- QMutableEventPoint::setState(touchPoint, QEventPoint::Updated);
+ QMutableEventPoint::from(touchPoint).setId(mouseEvent->buttons());
+ QMutableEventPoint::from(touchPoint).setState(QEventPoint::Updated);
break;
case QEvent::MouseButtonRelease:
// Check if any buttons are still held down after this event.
@@ -116,8 +116,8 @@ bool TouchMockingApplication::notify(QObject* target, QEvent* event)
touchType = QEvent::TouchUpdate;
else
touchType = QEvent::TouchEnd;
- QMutableEventPoint::setId(touchPoint, mouseEvent->button());
- QMutableEventPoint::setState(touchPoint, QEventPoint::Released);
+ QMutableEventPoint::from(touchPoint).setId(mouseEvent->button());
+ QMutableEventPoint::from(touchPoint).setState(QEventPoint::Released);
break;
case QEvent::MouseButtonDblClick:
// Eat double-clicks, their accompanying press event is all we need.
@@ -146,7 +146,7 @@ bool TouchMockingApplication::notify(QObject* target, QEvent* event)
// Update states for all other touch-points
for (QHash<int, QEventPoint>::iterator it = m_touchPoints.begin(), end = m_touchPoints.end(); it != end; ++it) {
if (!(it.value().id() & touchPoint.id()))
- QMutableEventPoint::setState(it.value(), QEventPoint::Stationary);
+ QMutableEventPoint::from(it.value()).setState(QEventPoint::Stationary);
}
Q_ASSERT(touchType != QEvent::None);
@@ -177,18 +177,18 @@ void TouchMockingApplication::updateTouchPoint(const QMouseEvent* mouseEvent, QE
// but since the canvas translates touch events we actually need to pass
// the screen position as the scene position to deliver the appropriate
// coordinates to the target.
- QMutableEventPoint::setPosition(touchPoint, mouseEvent->position());
- QMutableEventPoint::setScenePosition(touchPoint, mouseEvent->globalPosition());
+ QMutableEventPoint::from(touchPoint).setPosition(mouseEvent->position());
+ QMutableEventPoint::from(touchPoint).setScenePosition(mouseEvent->globalPosition());
if (touchPoint.state() == QEventPoint::Pressed)
- QMutableEventPoint::setScenePosition(touchPoint, mouseEvent->scenePosition());
+ QMutableEventPoint::from(touchPoint).setScenePosition(mouseEvent->scenePosition());
else {
const QEventPoint& oldTouchPoint = m_touchPoints[mouseButton];
- QMutableEventPoint::setGlobalLastPosition(touchPoint, oldTouchPoint.globalPosition());
+ QMutableEventPoint::from(touchPoint).setGlobalLastPosition(oldTouchPoint.globalPosition());
}
// Update current touch-point.
- QMutableEventPoint::setId(touchPoint, mouseButton);
+ QMutableEventPoint::from(touchPoint).setId(mouseButton);
m_touchPoints.insert(mouseButton, touchPoint);
}