summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2023-03-15 20:34:10 +0100
committerMichal Klocek <michal.klocek@qt.io>2023-03-23 12:50:59 +0100
commit426349bc1e3f863167753023dd6d65ae3a2404d6 (patch)
tree67a04ac5199fdc04b0901b198a86d97670716ab6
parent9fd30150ba979e0a79ad0b9b48261a9f699735bc (diff)
Fix compilation issues
Do not use QSslServer as it was introduced in 6.4. Change-Id: I628cc891af1f5eea653595b2d8d6314e372c6033 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r--examples/webenginewidgets/CMakeLists.txt2
-rw-r--r--examples/webenginewidgets/webenginewidgets.pro2
-rw-r--r--src/webenginewidgets/api/qwebengineview.h1
-rw-r--r--tests/auto/core/CMakeLists.txt2
-rw-r--r--tests/auto/quick/qmltests/tst_qmltests.cpp2
5 files changed, 5 insertions, 4 deletions
diff --git a/examples/webenginewidgets/CMakeLists.txt b/examples/webenginewidgets/CMakeLists.txt
index 89c147fbd..a66c5a66e 100644
--- a/examples/webenginewidgets/CMakeLists.txt
+++ b/examples/webenginewidgets/CMakeLists.txt
@@ -20,6 +20,6 @@ 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)
+if(QT_FEATURE_ssl AND QT_VERSION VERSION_GREATER_EQUAL "6.4")
qt_internal_add_example(clientcertificate)
endif()
diff --git a/examples/webenginewidgets/webenginewidgets.pro b/examples/webenginewidgets/webenginewidgets.pro
index ffc221147..7284e7ad8 100644
--- a/examples/webenginewidgets/webenginewidgets.pro
+++ b/examples/webenginewidgets/webenginewidgets.pro
@@ -25,4 +25,4 @@ qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross
message("Spellchecker example will not be built because it depends on usage of Hunspell dictionaries.")
}
-qtConfig(ssl): SUBDIRS += clientcertificate
+qtConfig(ssl):greaterThan(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 3):SUBDIRS += clientcertificate
diff --git a/src/webenginewidgets/api/qwebengineview.h b/src/webenginewidgets/api/qwebengineview.h
index 6f6a161f6..379fcae75 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/auto/core/CMakeLists.txt b/tests/auto/core/CMakeLists.txt
index ecb3b2cf9..619c0358b 100644
--- a/tests/auto/core/CMakeLists.txt
+++ b/tests/auto/core/CMakeLists.txt
@@ -4,7 +4,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/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;